-
Notifications
You must be signed in to change notification settings - Fork 151
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 a multi-arch Docker Image #51
Comments
This would be useful for people using Apple Silicon. $ docker run -it -v "$(pwd):/documents/" asciidoctor/docker-asciidoctor
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested |
$ docker buildx build --platform linux/amd64,linux/arm64 might do the trick. https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images |
I'm watching this issue with great interest because I often get asked about this for other images I maintain. Is it really as simple as using buildx, or is there a hardware requirement for the machine on which Docker is run? |
That would really be simple yes, as GitHub action provides a Docker Engine, and we use buildx already because we have a docker bake file. It means editing https://github.com/asciidoctor/docker-asciidoctor/blob/main/docker-bake.hcl to ensure that there is an arm64 platform, and that should be all: next release would have an arm64 version (I'm configdent since we did the same with Jenkins Docker images a few month ago with the bake file: https://github.com/jenkinsci/docker/blob/master/docker-bake.hcl#L206 The only "hard" part is Windows which is another scope. @sdavids Would you be interested into adding your contribution (with mentoring and help if you want it)? Otherwise I would do it my self, but anyone is welcome to try :) |
@mojavelinux @dduportal |
For the time being, the |
How could we motivate / accelerate the |
I managed to build an |
Hi @Weltraumschaf could you share the source ( |
@dduportal The |
What Raspberry Pi do you use @barthel ? |
Raspberry Pi Zero W (armv6l) and Raspberry Pi 3B (armv7l). Not tried |
I should definitely retry all that thanks to a GitHub action with Docker multiplatform. 🤔 |
@dduportal This could be handled in the original Docker image by CI or, even better, Asciidoctor switch over to Unmodified, expect the I'm open to share my knowledge to provide an official multi-arch Docker Image of Asciidoctor. |
Hello @barthel , many thanks for this work and for sharing the information! It's clearly worthwile asking for erd-go support in https://github.com/asciidoctor/asciidoctor-diagram as ERD is a dependency of this sub-project (introduced in asciidoctor/asciidoctor-diagram#118 for reference). As soon as erd-go is advertised as supported by asciidoctor-diagram, then we'll be able to switch in the official image. |
Both One big step forward to multi-platform Docker image. |
Let's go on with the multi-platform Docker Image. |
With GitHub actions, the runner is a VM with `dockerù already installed and running. You might want to add https://github.com/docker/setup-qemu-action to the workflow as a preliminary step, to ensure the qemu bindings are loading inside that VM's kernel. The alternative is to write down the steps (it is the case today but might be causing too much glue code) in a script or Makefile. It makes things reproducible to contributors machines. |
This issue is currently only related to
Does anyone have ideas or can support with one or both of these issues? My goal is to successfully get this item finally done after almost 6 years. |
We can already get started with To be honest, WDYT? |
As far as I know, there is no |
Sounds good @dduportal . I will try to get the |
Please at least add pre-built images for arm64. There are a lot of developer and cloud systems that are using arm64 nowadays, and the image seems to build just fine. This is an example of a GitHub workflow that can basically handle this for you. name: Build Container Image
on:
push:
branches:
- 'main'
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: asciidoctor/docker-asciidoctor:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} |
Hi, would you be willing to help by contributing? |
Yes, I'd be happy to contribute a bit to get this working, but from a fork, I don't think I can easily test GitHub workflows that need access to secrets and such. That being said, I am willing to pull something together to start with. |
As an additional note for now. I had to do this inside the container to use
It looks like both nokogiri-1.13.10 and nokogiri-1.15.5-aarch64-linux were installed. |
#I built the
On an
After cherry-picking from @spkane #407 the line regarding the removal of
Of course, not everything is multi-arch, so it fails in the end with:
I then modified the Makefile to make it multi-arch, but unfortunately, pandoc |
@dduportal See: #407 |
@gounthar This PR tries to handle that issue: #407 Using this PR, as a dev, you would run It might still need some tweaks, but in general that is what is required. |
This image is currently targeted on a Linux container with x86_64 CPU architecture.
Docker galaxy recently saw the "manifest 2.2" landing, enabling multi-arch support on a single image name.
In our case, it means that the command
docker pull asciidoctor/docker-asciidoctor
would have the same outcomes on any supported platform.The CPU architectures armv6 and armv7 would be easy to start with (using quemu it will be very easy to build and test within TravisCI).
x86 (32 bits) might work.
The Windows container version could be also easy to build, I am less sure on the test harness (we would need a Window server for this).
zOS: I don't know :)
Here is a list of useful links about this capability, to help to start with:
The text was updated successfully, but these errors were encountered: