diff --git a/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile b/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile index 1ee6f2b8..33d3c3d2 100644 --- a/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile +++ b/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile @@ -139,8 +139,12 @@ RUN export SKIP_IPTABLES=1 \ 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 \ - && curl -fLo /home/runner/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ - && chmod +x /home/runner/bin/docker-compose + && mkdir -p /home/runner/.docker/cli-plugins \ + && curl -fLo /home/runner/.docker/cli-plugins/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ + && chmod +x /home/runner/.docker/cli-plugins/docker-compose \ + && ln -s /home/runner/.docker/cli-plugins/docker-compose /home/runner/bin/docker-compose \ + && which docker-compose \ + && docker compose version ENTRYPOINT ["/bin/bash", "-c"] CMD ["entrypoint-dind-rootless.sh"] diff --git a/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile b/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile index b5f02d90..3e35d183 100644 --- a/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile +++ b/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile @@ -116,9 +116,12 @@ RUN export SKIP_IPTABLES=1 \ 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 \ - && mkdir -p /home/runner/bin \ - && curl -fLo /home/runner/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-${ARCH} \ - && chmod +x /home/runner/bin/docker-compose + && mkdir -p /home/runner/.docker/cli-plugins \ + && curl -fLo /home/runner/.docker/cli-plugins/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ + && chmod +x /home/runner/.docker/cli-plugins/docker-compose \ + && ln -s /home/runner/.docker/cli-plugins/docker-compose /home/runner/bin/docker-compose \ + && which docker-compose \ + && docker compose version ENTRYPOINT ["/bin/bash", "-c"] CMD ["entrypoint-dind-rootless.sh"] diff --git a/runner/actions-runner-dind.ubuntu-20.04.dockerfile b/runner/actions-runner-dind.ubuntu-20.04.dockerfile index da19b4b8..053ccc1c 100644 --- a/runner/actions-runner-dind.ubuntu-20.04.dockerfile +++ b/runner/actions-runner-dind.ubuntu-20.04.dockerfile @@ -106,8 +106,12 @@ RUN set -vx; \ 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 \ - && curl -fLo /usr/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ - && chmod +x /usr/bin/docker-compose + && 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 # We place the scripts in `/usr/bin` so that users who extend this image can # override them with scripts of the same name placed in `/usr/local/bin`. diff --git a/runner/actions-runner-dind.ubuntu-22.04.dockerfile b/runner/actions-runner-dind.ubuntu-22.04.dockerfile index 3532f2a5..6ee33dd2 100644 --- a/runner/actions-runner-dind.ubuntu-22.04.dockerfile +++ b/runner/actions-runner-dind.ubuntu-22.04.dockerfile @@ -82,8 +82,12 @@ RUN set -vx; \ 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 \ - && curl -fLo /usr/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ - && chmod +x /usr/bin/docker-compose + && 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 # We place the scripts in `/usr/bin` so that users who extend this image can # override them with scripts of the same name placed in `/usr/local/bin`. diff --git a/runner/actions-runner.ubuntu-20.04.dockerfile b/runner/actions-runner.ubuntu-20.04.dockerfile index 5c246a0c..83d55bba 100644 --- a/runner/actions-runner.ubuntu-20.04.dockerfile +++ b/runner/actions-runner.ubuntu-20.04.dockerfile @@ -103,8 +103,12 @@ RUN set -vx; \ 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 \ - && curl -fLo /usr/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ - && chmod +x /usr/bin/docker-compose + && 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 # We place the scripts in `/usr/bin` so that users who extend this image can # override them with scripts of the same name placed in `/usr/local/bin`. diff --git a/runner/actions-runner.ubuntu-22.04.dockerfile b/runner/actions-runner.ubuntu-22.04.dockerfile index 966856fb..28a61eb8 100644 --- a/runner/actions-runner.ubuntu-22.04.dockerfile +++ b/runner/actions-runner.ubuntu-22.04.dockerfile @@ -80,8 +80,12 @@ RUN set -vx; \ 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 \ - && curl -fLo /usr/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ - && chmod +x /usr/bin/docker-compose + && 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 # We place the scripts in `/usr/bin` so that users who extend this image can # override them with scripts of the same name placed in `/usr/local/bin`. diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index f6681558..ef925ccc 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -1081,6 +1081,17 @@ func installActionsWorkflow(t *testing.T, testName, runnerLabel, testResultCMNam }, }, ) + + // Ensure both the alias and the full command work after + // https://github.com/actions/actions-runner-controller/pull/2326 + steps = append(steps, + testing.Step{ + Run: "docker-compose version", + }, + testing.Step{ + Run: "docker compose version", + }, + ) } steps = append(steps,