Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose not available in arm image. #99

Closed
mrmachine opened this issue Mar 23, 2021 · 2 comments · Fixed by #100
Closed

docker-compose not available in arm image. #99

mrmachine opened this issue Mar 23, 2021 · 2 comments · Fixed by #100

Comments

@mrmachine
Copy link

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:

docker/compose#6831

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.

@mrmachine
Copy link
Author

I've worked around this issue (and the scaling with docker-compose issue):

#72 (comment)

@myoung34
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants