abiosoft / abiosoft/colima

[containerd] buildctl/nerdctl local image tagging

Offen
#1,356 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

Hello, first off thank you for the tool, I've been enjoying colima so far (and with vz on MacOS no less!)

The issue I'm running into may be one of documentation, if so I would appreciate some guidance. What I'm trying to do is build images locally using buildctl and have those images available in the colima-supplied kubernetes cluster.

I've tried a few things so far,

```bash
$ colima start --runtime containerd --kubernetes --cpu 8 -m 8
$ colima ssh-config | sed 's~^.*Control.*$\n~~' > ssh-config
$ ssh colima -L localhost:9998:/run/buildkit/buildkitd.sock # chmod/chown /run/buildkit appropriately
$ buildctl --addr localhost:9998 build --frontend dockerfile.v0 --local context=. --local dockerfile=. --opt platform=linux/amd64,linux/arm64 --output type=image,name=us-docker.pkg.dev/foo-bar-554433/main/hello-world:latest
```
which built, but was not available via
```bash
$ kubectl run temp-pod --rm -i --tty --image=us-docker.pkg.dev/foo-bar-554433/main/hello-world:latest --image-pull-policy=Never --restart=Never -- /bin/sleep infinity
```

I also attempted to use nerdctl (which seems more like the blessed path)

```bash
colima nerdctl -- build -f Dockerfile --platform=linux/amd64,linux/arm64 --output type=image,name=us-docker.pkg.dev/foo-bar-554433/main/hello-world:latest .
```

but unfortunately despite building, was still not available via
```bash
$ kubectl run temp-pod --rm -i --tty --image=us-docker.pkg.dev/foo-bar-554433/main/hello-world:latest --image-pull-policy=Never --restart=Never -- /bin/sleep infinity
```

---

Is there something obvious I'm missing?

I'm new to both colima _and_ buildkitd, which may be the issue, though I have had success with `--oci-worker=false --containerd-worker=true --containerd-worker-namespace=k8s.io` in some of my attempts in other kubernetes environments, but I'm trying to apply those strategies to colima and not having much success.

Thank you for your time

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.