astefanutti / decktape

PDF exporter for HTML presentations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How I was able to do a multi-architecture container image build (to support ARM ... M1 macbooks)

kurtfm opened this issue · comments

I thought I would leave this somewhere if it's useful for others. This is what I did to build a multi-arch decktape container image.

  1. Dockerfile update: remove the CHROMIUM_VERSION reference in the apk add ... so it's just chromium \ without the version (this was the only thing that broke when using docker buildx for multi-arch)
  2. Use Docker desktop with buildx. There are instructions on this in the wild.. but these were my steps:
docker buildx create --use   

Then verify I have the diff archs I want

docker buildx ls

Then build...

docker buildx build \                                                                                                                                                                                                                                                                                         
--push \
--platform linux/arm,linux/arm64,linux/amd64 \
--tag kurtfm/dt:latest \
.

Thanks a lot for sharing.

The image workflow is already supposed to publish a multi-architecture image for linux/arm64 and linux/amd64 to GitHub container registry at https://github.com/astefanutti/decktape/pkgs/container/decktape.

But I realise only linux/amd64 images get published on DockerHub. The workflow may also miss the linux/arm platform.

Ok, great, I missed that... I will switch to pulling from ghcr (instead of my fork)!