Skip to content

Commit

Permalink
Merge pull request #3268 from AkihiroSuda/fix-3265
Browse files Browse the repository at this point in the history
integration: add ENTRYPOINT to fix nested cgroup v2
  • Loading branch information
tonistiigi authored Nov 11, 2022
2 parents 58db174 + e5516c2 commit fdce451
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ RUN apk add --no-cache shadow shadow-uidmap sudo vim iptables ip6tables dnsmasq
&& xx-go --wrap \
&& curl -Ls https://raw.githubusercontent.com/containerd/nerdctl/$NERDCTL_VERSION/extras/rootless/containerd-rootless.sh > /usr/bin/containerd-rootless.sh \
&& chmod 0755 /usr/bin/containerd-rootless.sh
# The entrypoint script is needed for enabling nested cgroup v2 (https://github.com/moby/buildkit/issues/3265#issuecomment-1309631736)
RUN curl -Ls https://raw.githubusercontent.com/moby/moby/v20.10.21/hack/dind > /docker-entrypoint.sh \
&& chmod 0755 /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
# musl is needed to directly use the registry binary that is built on alpine
ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.5=/opt/containerd-alt-15/bin"
ENV BUILDKIT_INTEGRATION_SNAPSHOTTER=stargz
Expand Down
2 changes: 1 addition & 1 deletion hack/test
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fi
if [ "$TEST_GATEWAY" == 1 ]; then
# Build-test "github.com/moby/buildkit/frontend/gateway/client", which isn't otherwise built by CI
# It really only needs buildkit-base. We have integration-tests in $iid, which is a direct child of buildkit-base.
cid=$(docker create --rm --volumes-from=$cacheVolume $iid go build -v ./frontend/gateway/client)
cid=$(docker create --rm --volumes-from=$cacheVolume --entrypoint="" $iid go build -v ./frontend/gateway/client)
docker start -a $cid
fi

Expand Down

0 comments on commit fdce451

Please sign in to comment.