forked from sebsauvage/Shaarli
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Build Docker images that contain both amd64 and /arm/v7 #1496
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for your contribution. The build is working fine, however Docker buildx is an experimental feature that has only had been included with Docker in the latest version. Also, it's not enabled by default, so I'd rather wait before merging it. |
e2jk
added a commit
to e2jk/Shaarli
that referenced
this pull request
Dec 6, 2020
The Docker for armhf doesn't build anymore on Alpine 3.8, upgrading to 3.10. Building works fine on a Rapsberry Pi 4 running Raspbian GNU/Linux 10 (buster) This is the error with 3.8: ``` [2/4] Fetching packages... error css-loader@4.3.0: The engine "node" is incompatible with this module. Expected version ">= 10.13.0". error Found incompatible module info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. The command '/bin/sh -c apk --update --no-cache add yarn nodejs-current python2 build-base && cd /shaarli && yarn install && yarn run build && rm -rf node_modules' returned a non-zero code: 1 ``` Not upgrading to 3.11, due to this error: ``` 2/4] Fetching packages... error browserslist@4.14.3: The engine "node" is incompatible with this module. Expected version "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7". Got "13.1.0" error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. The command '/bin/sh -c apk --update --no-cache add yarn nodejs-current python2 build-base && cd /shaarli && yarn install && yarn run build && rm -rf node_modules' returned a non-zero code: 1 ``` Not upgrading to 3.12 either, due to this error: ``` ERROR: unsatisfiable constraints: py2-pip (missing): required by: world[py2-pip] The command '/bin/sh -c apk --update --no-cache add py2-pip && cd /usr/src/app/shaarli && pip install --no-cache-dir mkdocs && mkdocs build --clean' returned a non-zero code: 1 ``` There's probably a way to have Python2 pip installed on 3.12, but I suppose other issues would arise (such as the one happening with 3.11), so only proposing to upgrade to 3.10 now. This would probably be looked at more in detail when merging the amd64 and arm/v7 Docker builds, see shaarli#1496.
@cerebrate can you please rebase your changes on top of |
nodiscc
added a commit
to nodiscc/Shaarli
that referenced
this pull request
Mar 21, 2023
nodiscc
added a commit
to nodiscc/Shaarli
that referenced
this pull request
Mar 21, 2023
- ref. https://docs.docker.com/engine/reference/commandline/buildx_build/#platform - ref. https://docs.docker.com/build/ci/github-actions/multi-platform/ - replaces shaarli#1496 - make docker image name configurable through CI variables for easier testing
PR #1962 replaces this one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the separate Dockerfile for armhf and amends the primary Dockerfile to build successfully for both amd64 and arm/v7, then adds a Docker command to build and push a multiarch image as an additional makefile option, docker_image .
In addition to simplifying the build process, this produces a single Docker image which can be executed on either amd64 or arm/v7 architectures, which avoids the need to find the image for the other arch under a different name, and is particularly useful for those of us running mixed-architecture clusters.
(An example image produced by the below is cerebrate/shaarli .)