Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ jobs:
test-integration-docker:
name: "Integration test (Docker)"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
# The design of the proxy was changed in Docker v28.
# rootlesskit-docker-proxy is no longer used since Docker v28.
docker_version: [27.5.1, 28.0.1]
steps:
- name: "Set up AppArmor"
run: |
Expand All @@ -201,7 +207,9 @@ jobs:
- name: "Check out"
uses: actions/checkout@v4
- name: "Build integration test image"
run: DOCKER_BUILDKIT=1 docker build -t rootlesskit:test-integration-docker --target test-integration-docker .
run: DOCKER_BUILDKIT=1 docker build -t rootlesskit:test-integration-docker --target test-integration-docker --build-arg DOCKER_VERSION .
env:
DOCKER_VERSION: ${{ matrix.docker_version }}
- name: "Create a custom network to avoid IP confusion"
run: docker network create custom
- name: "Docker Integration test: net=slirp4netns, port-driver=builtin"
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG SHADOW_VERSION=4.16.0
ARG SLIRP4NETNS_VERSION=v1.3.1
ARG VPNKIT_VERSION=0.5.0
ARG PASST_VERSION=2024_12_11.09478d5
ARG DOCKER_VERSION=27.5.0
ARG DOCKER_VERSION=28.0.1
ARG DOCKER_CHANNEL=stable

FROM golang:${GO_VERSION}-alpine AS build
Expand Down Expand Up @@ -92,12 +92,18 @@ ENV LD_LIBRARY_PATH=/home/user/lib
WORKDIR /home/user/hack

FROM test-integration AS test-integration-docker
COPY --from=artifact /rootlesskit-docker-proxy /home/user/bin/
ARG DOCKER_VERSION
ARG DOCKER_CHANNEL
RUN curl -fsSL https://download.docker.com/linux/static/${DOCKER_CHANNEL}/x86_64/docker-${DOCKER_VERSION}.tgz | tar xz --strip-components=1 -C /home/user/bin/
RUN curl -fsSL -o /home/user/bin/dockerd-rootless.sh https://raw.githubusercontent.com/moby/moby/v${DOCKER_VERSION}/contrib/dockerd-rootless.sh && \
chmod +x /home/user/bin/dockerd-rootless.sh
# rootlesskit-docker-proxy is no longer needed since Docker v28
RUN --mount=source=/rootlesskit-docker-proxy,target=/tmp/rootlesskit-docker-proxy,from=artifact <<EOT
set -ex
if [ "$(echo ${DOCKER_VERSION} | cut -d . -f 1)" -lt "28" ]; then
cp -a /tmp/rootlesskit-docker-proxy /home/user/bin
fi
EOT
ENV DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns
ENV DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=builtin
ENV DOCKER_HOST=unix:///run/user/2000/docker.sock
Expand Down