Skip to content

Commit

Permalink
Add explicit containerd 1.7.x builds
Browse files Browse the repository at this point in the history
Closes #859
  • Loading branch information
tianon committed Nov 26, 2024
1 parent 114b2ef commit 5e2df83
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 1 deletion.
75 changes: 75 additions & 0 deletions containerd/Dockerfile.1.7
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")
39 changes: 39 additions & 0 deletions containerd/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"variants": [
"",
"rc",
"1.7",
"1.6"
],
"rc": {
Expand Down Expand Up @@ -78,6 +79,44 @@
}
}
},
"1.7": {
"commit": "88bf19b2105c8b17560993bee28a01ddc2f97182",
"ref": "refs/tags/v1.7.24^{}",
"tag": "v1.7.24",
"version": "1.7.24",
"arches": {
"amd64": {
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-amd64.tar.gz",
"sha256": "1a94f15139f37633f39e24f08a4071f4533b285df3cbee6478972d26147bcaef",
"dpkgArch": "amd64"
},
"arm64v8": {
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-arm64.tar.gz",
"sha256": "420406d2b34ebb422ab3755fbeede59bf3bfcfccf5cfa584b558c93769d99064",
"dpkgArch": "arm64"
},
"ppc64le": {
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-ppc64le.tar.gz",
"sha256": "2ca4d527dac68132a2a6b3971d82ddfd18edc7fa838b7cfcfe6eb11efd017871",
"dpkgArch": "ppc64el"
},
"riscv64": {
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-riscv64.tar.gz",
"sha256": "e570544ef0339caedc5daf54360d385d84dbc6d0070577ac561f19d51b5d59de",
"dpkgArch": "riscv64"
},
"s390x": {
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-s390x.tar.gz",
"sha256": "353ed879ff2e298d97f9d690b96bf9f1ece58b5adf291da32f900b5352bcc690",
"dpkgArch": "s390x"
},
"windows-amd64": {
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-windows-amd64.tar.gz",
"sha256": "3260984ce37c927a8d1de4c25471ebb0533abb5b9e6c4e30e3685df0ecbfb629",
"dpkgArch": null
}
}
},
"1.6": {
"commit": "88c3d9bc5b5a193f40b7c14fa996d23532d6f956",
"ref": "refs/tags/v1.6.36^{}",
Expand Down
4 changes: 3 additions & 1 deletion containerd/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ variants=(
''
'rc'

#'1.7' # TODO add this once 2.0 is stable
# https://containerd.io/releases/#support-horizon
# https://endoflife.date/containerd
'1.7'
'1.6'

# TODO add this when I figure out a clean way to do something more akin to a "weekly snapshot" or something so it doesn't have an update every single day (see also "buildkit")
Expand Down

0 comments on commit 5e2df83

Please sign in to comment.