Skip to content

Commit

Permalink
Merge pull request #141 from bitdeps/dennybaa/minor-cleanup
Browse files Browse the repository at this point in the history
chore: clean up Containerfile
  • Loading branch information
dennybaa authored Jan 15, 2025
2 parents 617c475 + 9485792 commit 51115d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions runners/Containerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## --- Actions Runner Dist
FROM alpine as runner-dist
FROM alpine AS runner-dist
# renovate: datasource=github-releases depName=actions/runner
ARG RUNNER_VERSION=2.321.0
# renovate: datasource=github-releases depName=actions/runner-container-hooks
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.6.2
#
ARG TARGETARCH=""
ARG TARGETOS="linux"
ARG TARGETARCH="${TARGETARCH:-}"

Check warning on line 8 in runners/Containerfile

View workflow job for this annotation

GitHub Actions / publish / image

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TARGETOS="${TARGETOS:-linux}"

Check warning on line 9 in runners/Containerfile

View workflow job for this annotation

GitHub Actions / publish / image

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETOS' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# Fetch runner
# ref: https://github.com/actions/runner/blob/main/images/Dockerfile
Expand All @@ -33,7 +33,7 @@ RUN mkdir -p /runner/tools/helpers \

## --- Actions Runner Image
FROM ubuntu:24.04@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
ARG TARGETARCH="${TARGETARCH}"
ARG TARGETARCH="${TARGETARCH:-}"

Check warning on line 36 in runners/Containerfile

View workflow job for this annotation

GitHub Actions / publish / image

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TARGETOS="${TARGETOS:-linux}"

Check warning on line 37 in runners/Containerfile

View workflow job for this annotation

GitHub Actions / publish / image

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TARGETOS' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# renovate: datasource=github-releases depName=bitdeps/podman-static
Expand All @@ -57,11 +57,13 @@ COPY --chmod=755 docker-compat.sh /usr/bin/docker
# Update and install essentials
RUN apt update -y \
&& apt install -y --no-install-recommends wget curl ca-certificates git lsb-release unzip uidmap libcap2-bin iptables tini \
qemu-user-static \
apt-transport-https gnupg \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt

# Install static podman
RUN export ARCH=${TARGETARCH:-$(arch | sed 's/x86_64/amd64/')}; \
[ "$ARCH" = "amd64" ] || { echo -e "\nError: Only amd64 podman is supported!"; exit 1; }; \
curl -sL https://github.com/bitdeps/podman-static/releases/download/v${PODMAN_VERSION}/podman-linux-${ARCH}.tar.gz | tar xzC /tmp \
&& dist=/tmp/podman-linux-${ARCH} \
# clean up dist and copy \
Expand Down

0 comments on commit 51115d3

Please sign in to comment.