Dockerfile: Make it easier to use ctr in shell container
Running `ctr` in `make shell` doesn't work by default - one has to invoke it via `ctr --address /run/docker/containerd/containerd.sock -n moby` or set the CONTAINERD_{ADDRESS,NAMESPACE} environment variables to be able to just use `ctr`. Considering ephemeral nature of these containers it's cumbersome to do it every time manually - this commit sets the variables to the default containerd socket address and makes it much easier to use ctr. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
b39c255d8c
commit
cf83842304
1 changed files with 2 additions and 0 deletions
|
@ -460,6 +460,8 @@ COPY --from=containerutil /build/ /usr/local/bin/
|
|||
COPY --from=crun /build/ /usr/local/bin/
|
||||
COPY hack/dockerfile/etc/docker/ /etc/docker/
|
||||
ENV PATH=/usr/local/cli:$PATH
|
||||
ENV CONTAINERD_ADDRESS=/run/docker/containerd/containerd.sock
|
||||
ENV CONTAINERD_NAMESPACE=moby
|
||||
WORKDIR /go/src/github.com/docker/docker
|
||||
VOLUME /var/lib/docker
|
||||
VOLUME /home/unprivilegeduser/.local/share/docker
|
||||
|
|
Loading…
Reference in a new issue