Open liuyiyangwang opened 11 months ago
@AkihiroSuda Is this supposed to work with nerdctl or is there some difference with what containerd namespace is used?
@AkihiroSuda这是否应该与 nerdctl 一起使用,或者与使用的 containerd 命名空间有什么区别? Thank you for your help, He will go to the image warehouse to pull the nginx: test01 image, Will not use local image
Please try this:
Setting up BuildKit with containerd worker
Rootless
:zap: Requirement nerdctl >= 0.18, BuildKit >= 0.10 $ CONTAINERD_NAMESPACE=default containerd-rootless-setuptool.sh install-buildkit-containerd
containerd-rootless-setuptool.sh
is aware ofCONTAINERD_NAMESPACE
andCONTAINERD_SNAPSHOTTER
envvars. It installs buildkitd to the specified containerd namespace. This allows BuildKit using containerd-managed images in that namespace as the base image. Note that BuildKit can't use images in other namespaces as of now.If
CONTAINERD_NAMESPACE
envvar is not specified, this script configures buildkitd to use "buildkit" namespace (not "default" namespace).You can install an additional buildkitd process in a different namespace by executing this script with specifying the namespace with
CONTAINERD_NAMESPACE
.BuildKit will expose the socket at
$XDG_RUNTIME_DIR/buildkit-$CONTAINERD_NAMESPACE/buildkitd.sock
ifCONTAINERD_NAMESPACE
is specified. IfCONTAINERD_NAMESPACE
is not specified, that location will be$XDG_RUNTIME_DIR/buildkit/buildkitd.sock
.Rootful
$ sudo systemctl enable --now buildkit
Then add the following configuration to
/etc/buildkit/buildkitd.toml
to enable containerd worker.[worker.oci] enabled = false [worker.containerd] enabled = true # namespace should be "k8s.io" for Kubernetes (including Rancher Desktop) namespace = "default"
Docker not installed The containerd used I have a mirror image
nerdctl images
REPOSITORY TAG IMAGE ID CREATED PLATFORM SIZE BLOB SIZE nginx test01 0d17b565c37b 3 weeks ago linux/amd64 149.1 MiB 54.1 MiB
cat Dockerfile
FROM nginx:test01 RUN echo yes
He went back to the image warehouse to retrieve the image Will not use local
Do brothers have a way to solve it? I am using Buildkit v0.12.3. Linux amd64. tar. gz