Skip to content

Commit

Permalink
Merge pull request #3212 from apostasie/dev-chores
Browse files Browse the repository at this point in the history
Bump buildkit and fuse in Dockerfile and minimal Dockerfile cleanup
  • Loading branch information
AkihiroSuda authored Jul 12, 2024
2 parents 05a085f + f759e03 commit d9d133c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 29 deletions.
47 changes: 26 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARG RUNC_VERSION=v1.1.13
ARG CNI_PLUGINS_VERSION=v1.5.1

# Extra deps: Build
ARG BUILDKIT_VERSION=v0.14.1
ARG BUILDKIT_VERSION=v0.15.0
# Extra deps: Lazy-pulling
ARG STARGZ_SNAPSHOTTER_VERSION=v0.15.1
# Extra deps: Encryption
Expand All @@ -34,7 +34,7 @@ ARG SLIRP4NETNS_VERSION=v1.3.1
# Extra deps: bypass4netns
ARG BYPASS4NETNS_VERSION=v0.4.1
# Extra deps: FUSE-OverlayFS
ARG FUSE_OVERLAYFS_VERSION=v1.13
ARG FUSE_OVERLAYFS_VERSION=v1.14
ARG CONTAINERD_FUSE_OVERLAYFS_VERSION=v1.0.8
# Extra deps: IPFS
ARG KUBO_VERSION=v0.29.0
Expand All @@ -57,13 +57,19 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.4.0 AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-debian
COPY --from=xx / /
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y git pkg-config dpkg-dev
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
git \
pkg-config \
dpkg-dev
ARG TARGETARCH
# libbtrfs: for containerd
# libseccomp: for runc and bypass4netns
RUN xx-apt-get update && \
xx-apt-get install -y binutils gcc libc6-dev libbtrfs-dev libseccomp-dev
RUN xx-apt-get update -qq && xx-apt-get install -qq --no-install-recommends \
binutils \
gcc \
libc6-dev \
libbtrfs-dev \
libseccomp-dev

FROM build-base-debian AS build-containerd
ARG TARGETARCH
Expand Down Expand Up @@ -241,14 +247,13 @@ COPY --from=build-full /out /

FROM ubuntu:${UBUNTU_VERSION} AS base
# fuse3 is required by stargz snapshotter
RUN apt-get update && \
apt-get install -qq -y --no-install-recommends \
apparmor \
bash-completion \
ca-certificates curl \
iproute2 iptables \
dbus dbus-user-session systemd systemd-sysv \
fuse3
RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
apparmor \
bash-completion \
ca-certificates curl \
iproute2 iptables \
dbus dbus-user-session systemd systemd-sysv \
fuse3
ARG CONTAINERIZED_SYSTEMD_VERSION
RUN curl -L -o /docker-entrypoint.sh https://raw.githubusercontent.com/AkihiroSuda/containerized-systemd/${CONTAINERIZED_SYSTEMD_VERSION}/docker-entrypoint.sh && \
chmod +x /docker-entrypoint.sh
Expand All @@ -274,9 +279,9 @@ RUN go env GOVERSION > /GOVERSION
FROM base AS test-integration
ARG DEBIAN_FRONTEND=noninteractive
# `expect` package contains `unbuffer(1)`, which is used for emulating TTY for testing
RUN apt-get update && \
apt-get install -qq -y \
expect git
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
expect \
git
COPY --from=goversion /GOVERSION /GOVERSION
ARG TARGETARCH
RUN curl -L https://golang.org/dl/$(cat /GOVERSION).linux-${TARGETARCH:-amd64}.tar.gz | tar xzvC /usr/local
Expand Down Expand Up @@ -320,10 +325,10 @@ FROM test-integration AS test-integration-rootless
# Install SSH for creating systemd user session.
# (`sudo` does not work for this purpose,
# OTOH `machinectl shell` can create the session but does not propagate exit code)
RUN apt-get update && \
apt-get install -qq -y \
uidmap \
openssh-server openssh-client
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
uidmap \
openssh-server \
openssh-client
# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> ssh` here
RUN ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N '' && \
useradd -m -s /bin/bash rootless && \
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile.d/SHA256SUMS.d/buildkit-v0.14.1

This file was deleted.

2 changes: 2 additions & 0 deletions Dockerfile.d/SHA256SUMS.d/buildkit-v0.15.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
803de21f1656b2f0398e09204abcff2943c17b6b5951fe5ccfc8300012fcb838 buildkit-v0.15.0.linux-amd64.tar.gz
dfa15ef3f194afc0f588de1e78053cdcd553e7de2f9692efe964c9aa7e9d621e buildkit-v0.15.0.linux-arm64.tar.gz
6 changes: 0 additions & 6 deletions Dockerfile.d/SHA256SUMS.d/fuse-overlayfs-v1.13

This file was deleted.

2 changes: 2 additions & 0 deletions Dockerfile.d/SHA256SUMS.d/fuse-overlayfs-v1.14
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bf2c19b80e68afe1f53bae7a08cc9e7fb2f1b49bfdb9e5b49ab87cbe80b97cd1 fuse-overlayfs-aarch64
4817a8896a9e6f0433080f88f5b71dec931e8829a89d64c71af94b0630ccb4a9 fuse-overlayfs-x86_64

0 comments on commit d9d133c

Please sign in to comment.