Skip to content

Commit

Permalink
add docker buildx
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Baryshev <dennybaa@gmail.com>
  • Loading branch information
dennybaa committed Mar 19, 2024
1 parent 683be22 commit cda623d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 3 additions & 6 deletions runners/docker-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
export CONTAINER_HOST=unix:///runner/podman.sock
export DOCKER_HOST=unix:///runner/podman.sock

## Ignore builder creation, not needed for buildah
if [ "$1" = "buildx" ]; then
if [ "$#" -eq 1 ] || [ "$2" = "create" ]; then
echo "Compat mode: $0 $@"; exit 0
fi
shift; exec /runner/tools/bin/buildx "$@"
else
exec /runner/tools/bin/podman --remote "$@"
fi

exec /runner/tools/bin/podman --remote "$@"
5 changes: 5 additions & 0 deletions runners/podman.containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ARG RUNNER_VERSION=""
ARG PODMAN_VERSION="4.9.3"
ARG CRUN_VERSION="1.14.4"
ARG GH_CLI_VERSION="2.45.0"
ARG BUILDX_VERSION="0.13.1"

# Fetch deps
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -y update && apt-get install -y \
Expand Down Expand Up @@ -56,6 +57,10 @@ RUN mkdir -p /runner/tools/bin \
# gh cli \
&& curl -fLo gh.tgz https://github.com/cli/cli/releases/download/v${GH_CLI_VERSION}/gh_${GH_CLI_VERSION}_linux_${TARGETARCH}.tar.gz \
&& tar -xzf gh.tgz && mv gh_${GH_CLI_VERSION}_linux_${TARGETARCH}/bin/gh /runner/tools/bin \
# docker buildx \
&& curl -fLo /runner/tools/bin/buildx \
"https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH}" \
&& chmod +x /runner/tools/bin/buildx \
&& rm -rf /tmp/*

COPY --chmod=755 docker-compat.sh /usr/bin/docker
Expand Down

0 comments on commit cda623d

Please sign in to comment.