docker-compose not available in arm image.
mrmachine opened this issue · comments
This line, which tries to install docker-compose
using the Docker recommended process, fails on ARM:
https://github.com/myoung34/docker-github-actions-runner/blob/master/Dockerfile.base#L57
Instead, we get a file whose contents are Not found
.
Docker does not actually release an ARM binary for Docker Compose. It seems to be a long standing problem with a lot of upvotes, and yet still no resolution:
The workaround that I am using on my host (where I have deployed the GitHub Actions runner) is the linuxserver image which does support ARM and is accessed via a run.sh
shim:
https://hub.docker.com/r/linuxserver/docker-compose
This is working for me outside of the GitHub Actions runner, with one caveat. Environment variables from the shell are no longer automatically passed through to the compose container. Only special variables like COMPOSE_FILE
and COMPOSE_PROJECT_NAME
are automatically handled. For everything else, I have to set COMPOSE_OPTIONS='-e FOO -e BAR -e BAZ'
to pass these through.
This is still a much better solution than the current completely broken docker-compose
binary. I can probably just build my own runner image that has the run.sh
shim installed as /usr/local/bin/docker-compose
, but it'd be great to see it in the official image.
I've worked around this issue (and the scaling with docker-compose issue):
Wow good catch. I don't use docker-compose often so I guess I just had no idea!
$ k run --restart=Never -it --image=ubuntu:focal test
# ( apt-get update; apt-get install -y curl ) >/dev/null 2>&1
# DOCKER_COMPOSE_VERSION="1.27.4" curl -sL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# cat /usr/local/bin/docker-compose
Not Found
I made a quick PR to note this limitation and avoid installing it in ARM based builds in #100 if you'd like to review it @mrmachine