Skip to content

Commit

Permalink
chore: bump docker and runner version and add imageos env var (#730)
Browse files Browse the repository at this point in the history
* chore: bump runner version

* chore: bump docker version

* feat: add in ImageOS env var

* chore: adding missing fail switches
  • Loading branch information
toast-gear authored Aug 18, 2021
1 parent dc9f9b0 commit b6465c5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release-runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ on:
- .github/workflows/build-and-release-runners.yml

env:
RUNNER_VERSION: 2.279.0
DOCKER_VERSION: 19.03.12
RUNNER_VERSION: 2.280.2
DOCKER_VERSION: 20.10.8
DOCKERHUB_USERNAME: summerwind

jobs:
Expand Down
16 changes: 9 additions & 7 deletions runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:20.04

ARG TARGETPLATFORM
ARG RUNNER_VERSION=2.279.0
ARG RUNNER_VERSION=2.280.2
ARG DOCKER_CHANNEL=stable
ARG DOCKER_VERSION=19.03.12
ARG DOCKER_VERSION=20.10.8
ARG DUMB_INIT_VERSION=1.2.5

RUN test -n "$TARGETPLATFORM" || (echo "TARGETPLATFORM must be set" && false)
Expand Down Expand Up @@ -56,7 +56,7 @@ RUN set -vx; \
export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \
&& if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \
&& curl -L -o docker.tgz https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz \
&& curl -f -L -o docker.tgz https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz \
&& tar zxvf docker.tgz \
&& install -o root -g root -m 755 docker/docker /usr/local/bin/docker \
&& rm -rf docker docker.tgz \
Expand All @@ -76,16 +76,16 @@ ENV HOME=/home/runner
# - Run `cd $repo/src`
# - Run `./dev.sh layout Release linux-x64`
# - Run `./dev.sh package Release linux-x64`
# - Run cp ../_package/actions-runner-linux-x64-2.279.0.tar.gz ../../actions-runner-controller/runner/
# - Beware that `2.279.0` might change across versions
# - Run cp ../_package/actions-runner-linux-x64-2.280.2.tar.gz ../../actions-runner-controller/runner/
# - Beware that `2.280.2` might change across versions
#
# See https://github.com/actions/runner/blob/main/.github/workflows/release.yml for more informatino on how you can use dev.sh
#
# If you're willing to uncomment the following line, you'd also need to comment-out the
# && curl -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
# line in the next `RUN` command in this Dockerfile, to avoid overwiding this runner.tar.gz with a remote one.

# COPY actions-runner-linux-x64-2.279.0.tar.gz /runnertmp/runner.tar.gz
# COPY actions-runner-linux-x64-2.280.2.tar.gz /runnertmp/runner.tar.gz

# Runner download supports amd64 as x64. Externalstmp is needed for making mount points work inside DinD.
#
Expand All @@ -97,7 +97,7 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& mkdir -p "$RUNNER_ASSETS_DIR" \
&& cd "$RUNNER_ASSETS_DIR" \
# Comment-out the below curl invocation when you use your own build of actions/runner
&& curl -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
&& curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
&& tar xzf ./runner.tar.gz \
&& rm runner.tar.gz \
&& ./bin/installdependencies.sh \
Expand All @@ -115,7 +115,9 @@ COPY --chown=runner:docker patched $RUNNER_ASSETS_DIR/patched

# Add the Python "User Script Directory" to the PATH
ENV PATH="${PATH}:${HOME}/.local/bin"
ENV ImageOS=ubuntu20

USER runner

ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["/entrypoint.sh"]
7 changes: 4 additions & 3 deletions runner/Dockerfile.dindrunner
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:20.04

ARG TARGETPLATFORM
ARG RUNNER_VERSION=2.279.0
ARG RUNNER_VERSION=2.280.2
ARG DOCKER_CHANNEL=stable
ARG DOCKER_VERSION=19.03.13
ARG DUMB_INIT_VERSION=1.2.5
Expand Down Expand Up @@ -60,7 +60,7 @@ RUN adduser --disabled-password --gecos "" --uid 1000 runner \
RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \
&& if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \
&& if ! curl -L -o docker.tgz "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz"; then \
&& if ! curl -f -L -o docker.tgz "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz"; then \
echo >&2 "error: failed to download 'docker-${DOCKER_VERSION}' from '${DOCKER_CHANNEL}' for '${ARCH}'"; \
exit 1; \
fi; \
Expand All @@ -86,7 +86,7 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x64 ; fi \
&& mkdir -p "$RUNNER_ASSETS_DIR" \
&& cd "$RUNNER_ASSETS_DIR" \
&& curl -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
&& curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
&& tar xzf ./runner.tar.gz \
&& rm runner.tar.gz \
&& ./bin/installdependencies.sh \
Expand Down Expand Up @@ -118,6 +118,7 @@ COPY --chown=runner:docker patched $RUNNER_ASSETS_DIR/patched

# Add the Python "User Script Directory" to the PATH
ENV PATH="${PATH}:${HOME}/.local/bin"
ENV ImageOS=ubuntu20

# No group definition, as that makes it harder to run docker.
USER runner
Expand Down
10 changes: 6 additions & 4 deletions runner/Dockerfile.ubuntu.1804
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:18.04

ARG TARGETPLATFORM
ARG RUNNER_VERSION=2.279.0
ARG RUNNER_VERSION=2.280.2
ARG DOCKER_CHANNEL=stable
ARG DOCKER_VERSION=19.03.12
ARG DOCKER_VERSION=20.10.8
ARG DUMB_INIT_VERSION=1.2.5

RUN test -n "$TARGETPLATFORM" || (echo "TARGETPLATFORM must be set" && false)
Expand Down Expand Up @@ -56,7 +56,7 @@ RUN set -vx; \
export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \
&& if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \
&& curl -L -o docker.tgz https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz \
&& curl -f -L -o docker.tgz https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz \
&& tar zxvf docker.tgz \
&& install -o root -g root -m 755 docker/docker /usr/local/bin/docker \
&& rm -rf docker docker.tgz \
Expand All @@ -78,7 +78,7 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x64 ; fi \
&& mkdir -p "$RUNNER_ASSETS_DIR" \
&& cd "$RUNNER_ASSETS_DIR" \
&& curl -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
&& curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \
&& tar xzf ./runner.tar.gz \
&& rm runner.tar.gz \
&& ./bin/installdependencies.sh \
Expand All @@ -96,7 +96,9 @@ COPY --chown=runner:docker patched $RUNNER_ASSETS_DIR/patched

# Add the Python "User Script Directory" to the PATH
ENV PATH="${PATH}:${HOME}/.local/bin"
ENV ImageOS=ubuntu20

USER runner

ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["/entrypoint.sh"]
4 changes: 2 additions & 2 deletions runner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ NAME ?= summerwind/actions-runner
DIND_RUNNER_NAME ?= ${NAME}-dind
TAG ?= latest

RUNNER_VERSION ?= 2.279.0
DOCKER_VERSION ?= 19.03.12
RUNNER_VERSION ?= 2.280.2
DOCKER_VERSION ?= 20.10.8

# default list of platforms for which multiarch image is built
ifeq (${PLATFORMS}, )
Expand Down

0 comments on commit b6465c5

Please sign in to comment.