mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 19:50:30 +00:00
Install Docker Compose v2 as a Docker CLI plugin (#2326)
Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user