Skip to content

Commit 43b3266

Browse files
authored
Prepare for v0.4.0 (#284)
* chore: minor fixes * docs: update faq * docs: fixes in FAQ * core: update ssh config * core: fix ssh controlpath edge case * k3s: fix metrics-server * docs: update faq * core: fix 9p regression
1 parent 4499fe7 commit 43b3266

File tree

10 files changed

+337
-137
lines changed

10 files changed

+337
-137
lines changed

README.md

Lines changed: 3 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Container runtimes on macOS (and Linux) with minimal setup.
2020

2121
### Installation
2222

23-
Colima is available on Homebrew, MacPorts, and Nix. Check [here](INSTALL.md) for other installation options.
23+
Colima is available on Homebrew, MacPorts, and Nix. Check [here](docs/INSTALL.md) for other installation options.
2424

2525
```
2626
# Homebrew
@@ -141,105 +141,9 @@ Colima means Containers in [Lima](https://github.com/lima-vm/lima).
141141

142142
Since Lima is aka Linux on Mac. By transitivity, Colima can also mean Containers on Linux on Mac.
143143

144-
## FAQ
144+
## FAQs
145145

146-
<details>
147-
<summary>How does Colima compare to Lima?</summary>
148-
<p>
149-
150-
Colima is basically a higher level usage of Lima and utilises Lima to provide Docker, Containerd and/or Kubernetes.
151-
152-
If you want more control over the underlying VM, you can either use Lima directly or override Colima's VM settings with [Lima overrides](https://github.com/lima-vm/lima/blob/873a39c6652fe5fcb07ee08418f39ccaeeea6979/pkg/limayaml/default.yaml#L271).
153-
154-
</p>
155-
</details>
156-
157-
<details>
158-
<summary>Can it run alongside Docker for Mac?</summary>
159-
<p>
160-
Yes, from version v0.3.0 Colima leverages Docker contexts and can thereby run alongside Docker for Mac.
161-
162-
`docker context list` can list all contexts and `docker context use` can be used to change the active context.
163-
164-
</p>
165-
</details>
166-
167-
<details>
168-
<summary>How to customize Docker config e.g. add insecure registries?</summary>
169-
<p>
170-
171-
### v0.3.4 or older
172-
173-
On first startup, Colima generates Docker daemon.json file at `$HOME/.colima/docker/daemon.json`.
174-
175-
Simply modify the daemon.json file accordingly and restart Colima.
176-
177-
### v0.4.0 or newer
178-
179-
Start Colima with `--edit` flag `colima start --edit` and add the config to the `docker` section.
180-
181-
To manually modify the config file, it is located at `$HOME/.colima/default/colima.yaml` for the default profile,
182-
, `$HOME/.colima/<profile>/colima.yaml` for other profiles, and `$HOME/.colima/_templates/default.yaml` for the default
183-
template.
184-
185-
</p>
186-
</details>
187-
188-
<details>
189-
<summary>How does it compare to minikube, Kind, K3d?</summary>
190-
<p>
191-
192-
### For Kubernetes
193-
194-
Yes, you can create a Kubernetes cluster with minikube (with Docker driver), Kind or K3d instead of enabling Kubernetes
195-
in Colima. Those are better options if you need multiple clusters, or do not need Docker and Kubernetes to share the
196-
same images and runtime.
197-
198-
### For Docker
199-
200-
Minikube with Docker runtime can expose the cluster's Docker with `minikube docker-env`. But there are some caveats.
201-
202-
- Kubernetes is not optional, even if you only need Docker.
203-
204-
- All of minikube's free drivers for macOS fall-short in one of performance, port forwarding or volumes. While
205-
port-forwarding and volumes are non-issue for Kubernetes, they can be a deal breaker for Docker-only use.
206-
207-
### Compatibility
208-
209-
Colima with Docker runtime is compatible with Kind and K3d.
210-
211-
</p>
212-
</details>
213-
214-
<details>
215-
<summary>Are M1 macs supported?</summary>
216-
<p>
217-
218-
Colima supports and works on M1 macs but not rigorously tested as the author do not currently possess an M1 device.
219-
Feedbacks would be appreciated.
220-
221-
</p>
222-
</details>
223-
224-
<details>
225-
<summary>Can I set default configurations?</summary>
226-
<p>
227-
228-
Yes, via the `template` command.
229-
230-
```
231-
colima template
232-
```
233-
234-
Use a preferred editor by setting `$EDITOR` or passing the `--editor` flag
235-
236-
```sh
237-
colima start --edit --editor code # one-off edit
238-
colima template --editor code # set the default config
239-
```
240-
241-
</p>
242-
</details>
146+
Check [here](docs/FAQ.md) for Frequently Asked Questions.
243147

244148
## Help Wanted
245149

cmd/nerdctl.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var nerdctlLinkFunc = func() *cobra.Command {
9797
Profile string
9898
}{
9999
ColimaApp: os.Args[0],
100-
Profile: strings.TrimPrefix(config.Profile().ID, "colima-"),
100+
Profile: config.Profile().ShortName,
101101
}
102102
var buf bytes.Buffer
103103
if err := t.Execute(&buf, values); err != nil {
@@ -112,6 +112,9 @@ var nerdctlLinkFunc = func() *cobra.Command {
112112
return fmt.Errorf("error backing up existing file: %w", err)
113113
}
114114
}
115+
if err := os.MkdirAll("/usr/local/bin", 0755); err != nil {
116+
return nil
117+
}
115118
return os.WriteFile(nerdctlCmdArgs.path, buf.Bytes(), 0755)
116119
}
117120

@@ -123,6 +126,14 @@ var nerdctlLinkFunc = func() *cobra.Command {
123126
return fmt.Errorf("error backing up existing file: %w", err)
124127
}
125128
}
129+
// prepare dir
130+
{
131+
c := cli.CommandInteractive("sudo", "mkdir", "-p", "/usr/local/bin")
132+
if err := c.Run(); err != nil {
133+
return err
134+
}
135+
}
136+
// install script
126137
{
127138
c := cli.CommandInteractive("sudo", "sh", "-c", "cat > "+nerdctlCmdArgs.path)
128139
c.Stdin = &buf

cmd/ssh-config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ func init() {
3333
root.Cmd().AddCommand(sshConfigCmd)
3434

3535
sshConfigCmd.Flags().StringVarP(&sshConfigCmdArgs.format, "format", "f", "config", "format (config, cmd)")
36-
sshConfigCmd.Flags().BoolVarP(&sshCmdArgs.layer, "layer", "l", true, "config for the Ubuntu layer (if enabled)")
36+
sshConfigCmd.Flags().BoolVarP(&sshConfigCmdArgs.layer, "layer", "l", true, "config for the Ubuntu layer (if enabled)")
3737
}

0 commit comments

Comments
 (0)