Skip to content
Merged
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
26 changes: 13 additions & 13 deletions linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update \
RUN mkdir -p /home/runner/actions-runner \
&& export DERIVED_INSTRUCTION_SET="$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/)" \
&& export INSTRUCTION_SET="${INSTRUCTION_SET:-$DERIVED_INSTRUCTION_SET}" \
&& curl -Lf https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${INSTRUCTION_SET}-${RUNNER_VERSION}.tar.gz -o /home/runner/actions-runner/actions.tar.gz \
&& curl -fsSL --connect-timeout 30 --retry 3 https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${INSTRUCTION_SET}-${RUNNER_VERSION}.tar.gz -o /home/runner/actions-runner/actions.tar.gz \
&& cd /home/runner/actions-runner \
&& tar -xzf actions.tar.gz \
&& rm actions.tar.gz \
Expand All @@ -51,30 +51,30 @@ RUN apt-get update \
python3

# install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | UV_VERSION=${UV_VERSION} UV_INSTALL_DIR=/usr/local/bin sh
RUN curl -fsSL --connect-timeout 30 --retry 3 https://astral.sh/uv/install.sh | UV_VERSION=${UV_VERSION} UV_INSTALL_DIR=/usr/local/bin sh

# install gh cli
RUN curl -Lf -H "Accept: application/vnd.github+json" https://api.github.com/repos/cli/cli/releases/latest \
RUN curl -fsSL --connect-timeout 30 --retry 3 -H "Accept: application/vnd.github+json" https://api.github.com/repos/cli/cli/releases/latest \
| jq -r '.tag_name' \
| sed 's/^v//g' \
> /tmp/ghcli_vers.txt \
&& export DERIVED_ARCH="$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)" \
&& export ARCH="${ARCH:-$DERIVED_ARCH}" \
&& curl -Lf -H "Accept: application/vnd.github+json" https://api.github.com/repos/cli/cli/releases/latest \
&& curl -fsSL --connect-timeout 30 --retry 3 -H "Accept: application/vnd.github+json" https://api.github.com/repos/cli/cli/releases/latest \
| jq ".assets[] | select(.name == \"gh_$(cat /tmp/ghcli_vers.txt)_linux_${ARCH}.deb\")" \
| jq -r '.browser_download_url' \
| curl -Lf $(cat -) -o /tmp/ghcli.deb \
| curl -fsSL --connect-timeout 30 --retry 3 $(cat -) -o /tmp/ghcli.deb \
&& rm /tmp/ghcli_vers.txt \
&& apt-get install -y /tmp/ghcli.deb \
&& rm /tmp/ghcli.deb

# install rv
RUN export DERIVED_ARCH="$(arch)" \
&& export ARCH="${ARCH:-$DERIVED_ARCH}" \
&& curl -Lf -H "Accept: application/vnd.github+json" "https://api.github.com/repos/spinel-coop/rv/releases/tags/v${RV_VERSION}" \
&& curl -fsSL --connect-timeout 30 --retry 3 -H "Accept: application/vnd.github+json" "https://api.github.com/repos/spinel-coop/rv/releases/tags/v${RV_VERSION}" \
| jq ".assets[] | select(.name == \"rv-${ARCH}-unknown-linux-gnu.tar.xz\")" \
| jq -r '.browser_download_url' \
| curl -Lf $(cat -) -o /tmp/rv.tar.xz \
| curl -fsSL --connect-timeout 30 --retry 3 $(cat -) -o /tmp/rv.tar.xz \
&& tar -xvf /tmp/rv.tar.xz -C /tmp \
&& install -m 755 /tmp/rv-${ARCH}-unknown-linux-gnu/rv /usr/local/bin/rv \
&& ln -s /usr/local/bin/rv /usr/local/bin/rvx \
Expand All @@ -87,15 +87,15 @@ RUN mkdir -p /home/runner/tmp \
&& export DERIVED_ARCH="$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)" \
&& export ARCH="${ARCH:-$DERIVED_ARCH}" \
&& BASE_URL="https://download.docker.com/linux/ubuntu/dists/noble/pool/stable/${ARCH}" \
&& curl -Lf ${BASE_URL}/containerd.io_${CONTAINERD_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./containerd.io.deb \
&& curl -Lf ${BASE_URL}/docker-ce_${DOCKER_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-ce.deb \
&& curl -Lf ${BASE_URL}/docker-ce-cli_${DOCKER_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-ce-cli.deb \
&& curl -Lf ${BASE_URL}/docker-buildx-plugin_${BUILDX_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-buildx-plugin.deb \
&& curl -Lf ${BASE_URL}/docker-compose-plugin_${COMPOSE_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-compose-plugin.deb \
&& curl -fsSL --connect-timeout 30 --retry 3 ${BASE_URL}/containerd.io_${CONTAINERD_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./containerd.io.deb \
&& curl -fsSL --connect-timeout 30 --retry 3 ${BASE_URL}/docker-ce_${DOCKER_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-ce.deb \
&& curl -fsSL --connect-timeout 30 --retry 3 ${BASE_URL}/docker-ce-cli_${DOCKER_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-ce-cli.deb \
&& curl -fsSL --connect-timeout 30 --retry 3 ${BASE_URL}/docker-buildx-plugin_${BUILDX_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-buildx-plugin.deb \
&& curl -fsSL --connect-timeout 30 --retry 3 ${BASE_URL}/docker-compose-plugin_${COMPOSE_VERSION}-1~ubuntu.24.04~noble_${ARCH}.deb -o ./docker-compose-plugin.deb \
&& apt-get install -y $(ls *.deb | sed -e "s/^/.\//") \
&& rm $(ls *.deb) \
&& sed -i 's/ulimit -Hn/# ulimit -Hn/g' /etc/init.d/docker \
&& getent group docker || groupadd docker > /dev/null \
&& (getent group docker || groupadd docker > /dev/null) \
&& usermod -aG docker runner

COPY --chmod=755 etc/init.d/docker /etc/init.d/docker
Expand Down
Loading