Skip to content

Commit

Permalink
Install docker-compose, wget, and jq
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-z committed Jan 26, 2024
1 parent 4326b44 commit 13bc08b
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
FROM --platform=linux/amd64 ghcr.io/actions/actions-runner:2.312.0@sha256:da57c2566f6f0c3826fb0f41029ec9c0ba23070db789b662166687eeaf0298cc
# Parts of this file are based on the legacy GitHub Actions Runner Dockerfile (a.k.a. summerwind/actions-runner)
# - https://github.com/actions/actions-runner-controller/blob/f7b6ad901d7021046038f69e0d4d1055c41e9914/runner/

ARG TARGETPLATFORM=linux/amd64
# This is the official actions-runner image packaged with gha-runner-scale-set
ARG BASE_IMAGE=ghcr.io/actions/actions-runner:2.312.0@sha256:da57c2566f6f0c3826fb0f41029ec9c0ba23070db789b662166687eeaf0298cc

FROM --platform=$TARGETPLATFORM $BASE_IMAGE

ARG DOCKER_COMPOSE_VERSION=v2.23.0
ARG TARGETPLATFORM

USER root

# Derived from https://github.com/actions/actions-runner-controller/blob/f7b6ad901d7021046038f69e0d4d1055c41e9914/runner/actions-runner.ubuntu-22.04.dockerfile
RUN apt-get update -y \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:git-core/ppa \
Expand All @@ -15,6 +24,23 @@ RUN apt-get update -y \
sudo \
unzip \
zip \
wget \
jq \
&& rm -rf /var/lib/apt/lists/*

# Download latest git-lfs version
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get install -y --no-install-recommends git-lfs

RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& echo "ARCH: $ARCH" \
&& if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \
&& if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \
&& mkdir -p /usr/libexec/docker/cli-plugins \
&& curl -fLo /usr/libexec/docker/cli-plugins/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \
&& chmod +x /usr/libexec/docker/cli-plugins/docker-compose \
&& ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose \
&& which docker-compose \
&& docker compose version

USER runner

0 comments on commit 13bc08b

Please sign in to comment.