-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add explicit containerd 1.7.x builds
Closes #859
- Loading branch information
Showing
3 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# | ||
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" | ||
# | ||
# PLEASE DO NOT EDIT IT DIRECTLY. | ||
# | ||
|
||
FROM debian:bookworm-slim | ||
|
||
# runtime deps | ||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
wget \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# https://github.com/docker/docker/tree/master/hack/dind | ||
ENV DIND_COMMIT 65cfcc28ab37cb75e1560e4b4738719c07c6618e | ||
RUN set -eux; \ | ||
wget -O /usr/local/bin/dind "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind"; \ | ||
sh -n /usr/local/bin/dind; \ | ||
chmod +x /usr/local/bin/dind | ||
|
||
# https://github.com/opencontainers/runc/releases | ||
ENV RUNC_VERSION 1.2.2 | ||
RUN set -eux; \ | ||
dpkgArch="$(dpkg --print-architecture)"; \ | ||
case "$dpkgArch" in \ | ||
'amd64') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.amd64'; sha256='a34f5ab4fc1df1f456293c3d797a76f2d41cf3cd970bb49fc53ba94bbc8a5cf6' ;; \ | ||
'i386') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.386'; sha256='7d05edbb10405f3fa77d8e6b3646cab4ca07a67c21110fcdc05d2e33224bf253' ;; \ | ||
'arm64') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.arm64'; sha256='bfd3e6c58bd6060eaa725520c31cbc8f6386ac7606e65bfa7fe9084100aa1789' ;; \ | ||
'armhf') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.armhf'; sha256='78b8eb427e4b55431edc1d73772889f0905b7ae9f1273839fe9478edc1a99949' ;; \ | ||
'ppc64el') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.ppc64le'; sha256='9af46fe0bdc654c72593a937806ca034ffbbf4f62f25c1de7a40b5b0f4374de7' ;; \ | ||
'riscv64') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.riscv64'; sha256='cc169ba3fe80981759034c5ebcb20534d90c4d3e8e6825950bc2c192f800bd0b' ;; \ | ||
's390x') url='https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.s390x'; sha256='33fe3bab8d12a43f0499fc018abbac2536e61c0c30bc9e962df363549ae58b34' ;; \ | ||
*) echo >&2 "error: unsupported architecture: '$dpkgArch'"; exit 1 ;; \ | ||
esac; \ | ||
# TODO $url.asc (see https://github.com/opencontainers/runc/releases) | ||
wget -O /usr/local/bin/runc "$url" --progress=dot:giga; \ | ||
echo "$sha256 */usr/local/bin/runc" | sha256sum --strict --check -; \ | ||
chmod +x /usr/local/bin/runc; \ | ||
runc --version | ||
|
||
# https://github.com/containerd/containerd/releases | ||
ENV CONTAINERD_VERSION 1.7.24 | ||
RUN set -eux; \ | ||
dpkgArch="$(dpkg --print-architecture)"; \ | ||
case "$dpkgArch" in \ | ||
'amd64') url='https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-amd64.tar.gz'; sha256='1a94f15139f37633f39e24f08a4071f4533b285df3cbee6478972d26147bcaef' ;; \ | ||
'arm64') url='https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-arm64.tar.gz'; sha256='420406d2b34ebb422ab3755fbeede59bf3bfcfccf5cfa584b558c93769d99064' ;; \ | ||
'ppc64el') url='https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-ppc64le.tar.gz'; sha256='2ca4d527dac68132a2a6b3971d82ddfd18edc7fa838b7cfcfe6eb11efd017871' ;; \ | ||
'riscv64') url='https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-riscv64.tar.gz'; sha256='e570544ef0339caedc5daf54360d385d84dbc6d0070577ac561f19d51b5d59de' ;; \ | ||
's390x') url='https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-s390x.tar.gz'; sha256='353ed879ff2e298d97f9d690b96bf9f1ece58b5adf291da32f900b5352bcc690' ;; \ | ||
*) echo >&2 "error: unsupported architecture: '$dpkgArch'"; exit 1 ;; \ | ||
esac; \ | ||
wget -O containerd.tar.gz "$url" --progress=dot:giga; \ | ||
echo "$sha256 *containerd.tar.gz" | sha256sum --strict --check -; \ | ||
tar -xvf containerd.tar.gz -C /usr/local/; \ | ||
rm containerd.tar.gz; \ | ||
containerd --version | ||
|
||
RUN set -eux; \ | ||
mkdir -p /run/containerd /var/lib/containerd; \ | ||
chmod 1777 /run/containerd /var/lib/containerd | ||
|
||
VOLUME /var/lib/containerd | ||
|
||
# add an entrypoint that does clever things if the container is run as non-root (cannot run containers, but content/image stores should work fine) | ||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["containerd"] | ||
|
||
# the entrypoint will try to automatically determine intent based on uid/gid (and include the "dind" wrapper automatically) | ||
# if it does not, use "docker run ... dind containerd" if you want to run real containers (with "--privileged") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters