-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Provide support for ARM 32bit #4444
Conversation
Added a new Dockerfile (Dockerfile.armhf) specific for ARM 32 bit. The Dockerfile was updated compare to default one: - Base image is armhf/debian instead of debian - Docker binary is downloaded with the correct arch (although it does not seems to be used) Signed-off-by: Jean-Christophe Berthon <huygens@berthon.eu>
Modify `script/test/default` so it supports a first attempt at testing on ARM. Call the script with: `$ DOCKERFILE=Dockerfile.armhf script/test/default` to use the Dockerfile.armhf instead of the default Dockerfile for building the image. However, running the script is not working fully. The problem is that `dockerswarm/dind` does not provide an ARM image and therefore cannot be executed. If that is fixed then we should be able to change the script in order to use the ARM image instead of the default x86_64 image for running further tests. Signed-off-by: Jean-Christophe Berthon <huygens@berthon.eu>
I have found out that I would need to update the script/release/build-binaries in order to build for the right target platform. Actually, this script does not need to be changed, but the scripts it calls should be adapted. I can try to work on that, but I'd like some feedback/guidance on how to do that so it fits best with the project "culture". My idea would be to add an architecture detection function which could be called by scripts in order to pick the right Dockerfile. So basically, the script call the detection functions which returns "armhf" (for instance) and then check that a Dockerfile.armhf exists if not fails. For amd64 (the "default" architecture), we would search for Dockerfile simply (without an filename extension). This would require of course that all Dockerfile have an equivalent for each CPU architecture. What do you think? |
Hey, thanks for taking the time to look into this, and sorry for the delayed response! This PR as it is looks good to me. As far as |
Hi @shin- Great! That is fine with me. I can come up with such script. Do you prefer that I make a new PR then? Given my limited free time, it might take a week or two before I find the time to write it. |
Yes, a separate PR is fine whenever you have time to do so. Thank you! |
I wanted to use
docker-compose
on my Raspberry Pi 2 (ARM 32bit). There is no built version for it, so I attempted to build one myself. The provided commit implement the necessary change to support this architecture. Fixes #3795Based on the
master
branch and due to recent commits (which upgraded pip and a few other dependencies), the change is now very simple. Basically it revolves around changing the base image (debian
is x86_64 only, so I've been usingarmhf/debian
instead) and downloading the docker binary for armel architecture.I've tried to adapt the script/test/default in order to validate the generated docker-compose binary, but it is an unfinished job as I'm stuck with the fact that there are no images available of
dind
for ARM (dockerswarm/dind
only provide x86_64 images).Anyway, I have 2 small projects which uses docker-compose.yml and both works. But I'm only using a subset of all of docker-compose features, and I do not have a Swarm configured to test those aspects as well. So my commit is only partially validated. But at least it works perfectly for what I'm using of it.
Note: Try to use the
bump-1.10.0
branch (in order to get a "stable" version of docker-compose) is a bit more tricky and requires several additional changes w.r.t. this PR. Those are visible on this branch of my fork, this is just for your information.