Add multiarch support - #12
Conversation
|
Thanks a lot for your contribution ! This is very welcomed :) |
|
Thanks, happy to contribute! Oh I should also mention that the Dockerfiles are updated to add QEMU but the binaries are not included in the repo so a regular build will fail. Travis downloads them during build since that's how I build all my images usually. You can find the QEMU static binary project I pulled from here https://github.com/multiarch/qemu-user-static Hope this all helps and let me know if I need to change anything :) |
Mostly security updates on the fedora package changelog
| - 'echo " \"experimental\": \"enabled\"" >> $HOME/.docker/config.json' | ||
| - 'echo "}" >> $HOME/.docker/config.json' | ||
| - sudo service docker restart | ||
| - git clone https://github.com/sstephenson/bats.git |
There was a problem hiding this comment.
Hello Everyone,
Out of curiosity. Is there a specific reason that the old bats was preferred and not the new repository (https://github.com/bats-core/bats-core)? Apparently the sstephenson/bats is abandoned (sstephenson/bats#248) and a new community has already emerge (sstephenson/bats#150).
Also I would pin the checkout to a specific version/release, so you are certain that something is broken in your build and not in your build scripts :)
KR,
Vasileios
Update: Nevermind. I saw that in the documentation of the image we are also using the old version.
|
Thanks a lot for your work! Hope this PR will be merged soon and applied in other containers for arm support (like openldap) 😃 |
|
This can be simplified a lot with docker buildx: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/ |
Hi, sorry this is one of my first PRs and I'm not sure if this is the right format or not. Please let me know and I can adjust or delete this as needed.
This PR adds support for docker manifest lists and uses travis-ci to automate build and deployment of your lightweight docker base image. I did not modify the content of the image with the exception of adding the qemu static binary for the desired architecture to allow for building with travis-ci (which only uses x86 machines).
There are now multiple Dockerfiles (and the Makefile has been adjusted) to allow for cross-building on multiple architectures (the default light-baseimage appears to be built on x86 and thus cannot be used on armv7 or arm64 devices like the Raspberry Pi).
The Makefile now creates repositories named light-baseimage-ARCH. These images have had qemu static binaries added so they can be built from the arm64v8 and arm32v7 variants of debian stretch slim.
Additionally, since I use Travis-CI for my own images, I added support for it here. This automates building/deploying of the images and does a quick test to make sure the image runs after build (without exec format errors). I have tested this in my own repo (ndanyluk/light-baseimage) and the builds pass.
The multi-stage Travis-CI build creates the new repositories in parallel, then makes use of the Docker Manifest command (experimental) to create a single multi-arch image (arm32, arm64, and amd64) and deploy to Docker Hub.