Get docker compose installed
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m1s
Build / Build and analyze (push) Successful in 27s

This commit is contained in:
2025-12-30 00:26:56 -05:00
parent 7c76a246a3
commit 14ff055d61

View File

@@ -11,12 +11,14 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
ARG DOCKER_VERSION=24.0.6
ARG DOCKER_COMPOSE_VERSION=1.21.0
ARG DOCKER_VERSION=29.1.3
ARG DOCKER_COMPOSE_VERSION=2.40.3
ARG DOCKER_BUILDX_VERSION=0.30.1
RUN curl -fsSL https://download.docker.com/linux/static/stable/`uname -m`/docker-$DOCKER_VERSION.tgz \
| tar --strip-components=1 -xz -C /usr/local/bin docker/docker && \
curl -fsSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
RUN curl -fsSL https://download.docker.com/linux/static/stable/$(uname -m)/docker-$DOCKER_VERSION.tgz \
| tar --strip-components=1 -xz -C /usr/local/bin docker/docker
ADD https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/docker-compose-plugin_$DOCKER_COMPOSE_VERSION-1~debian.12~bookworm_amd64.deb .
RUN gdebi --n ./docker-compose-plugin_2.40.3-1~debian.12~bookworm_amd64.deb
# Enable buildx plugin
## buildx is released as amd64, and uname calls it x86_64
@@ -24,7 +26,7 @@ RUN uname -m > /tmp/arch \
&& sed -i 's/x86_64/amd64/g' /tmp/arch \
&& mkdir -p /usr/libexec/docker/cli-plugins/
RUN curl -fsSL https://github.com/docker/buildx/releases/download/v$DOCKER_BUILDX_VERSION/buildx-v$DOCKER_BUILDX_VERSION.linux-`cat /tmp/arch` > /usr/libexec/docker/cli-plugins/docker-buildx
RUN curl -fsSL "https://github.com/docker/buildx/releases/download/v$DOCKER_BUILDX_VERSION/buildx-v$DOCKER_BUILDX_VERSION.linux-$(cat /tmp/arch)" > /usr/libexec/docker/cli-plugins/docker-buildx
RUN chmod +x /usr/libexec/docker/cli-plugins/docker-buildx \
&& docker buildx install \
&& rm /tmp/arch
@@ -34,16 +36,17 @@ RUN chmod +x /usr/libexec/docker/cli-plugins/docker-buildx \
# --driver docker-container \
# --bootstrap --use
RUN groupadd -g 988 docker # 988 matches the docker group on candace
RUN usermod -aG docker jenkins
# gid 988 matches the docker group on candace
RUN groupadd -g 988 docker && \
usermod -aG docker jenkins
COPY ca-chain.crt /usr/local/share/ca-certificates/ca-chain.crt
RUN /usr/sbin/update-ca-certificates
USER jenkins
RUN mkdir $HOME/.ssh/
RUN touch $HOME/.ssh/known_hosts
RUN ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN mkdir "$HOME/.ssh/" && \
touch $HOME/.ssh/known_hosts && \
ssh-keyscan github.com >> ~/.ssh/known_hosts
ENTRYPOINT ["/usr/local/bin/jenkins-agent"]