You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the workflow publish.yml to include three extra things:
QEMU setup stage
Buildx setup stage
Add the platform key to the docker/build-push-action, with linux/amd64,linux/arm64 specified.
Full modified workflow:
name: Publishon: pushenv:
# Use docker.io for Docker Hub if emptyREGISTRY: ghcr.io# github.repository as <account>/<repo>IMAGE_NAME: ${{ github.repository }}jobs:
build:
runs-on: ubuntu-latestpermissions:
contents: readpackages: writesteps:
- name: Checkout repositoryuses: actions/checkout@v4# Login against a Docker registry# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}uses: docker/login-action@v3with:
registry: ${{ env.REGISTRY }}username: ${{ github.actor }}password: ${{ secrets.GITHUB_TOKEN }}# Extract metadata (tags, labels) for Docker# https://github.com/docker/metadata-action
- name: Extract Docker metadataid: metauses: docker/metadata-action@v5with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}# Setup QEMU emulator to build multi-arch images# https://github.com/docker/setup-qemu-action
- name: Set up QEMUuses: docker/setup-qemu-action@v3# Configure Buildx for Docker build# https://github.com/docker/setup-buildx-action
- name: Set up Buildxuses: docker/setup-buildx-action@v3# Build and push Docker image with Buildx# https://github.com/docker/build-push-action
- name: Build and push Docker imageuses: docker/build-push-action@v5with:
context: .push: truetags: ${{ steps.meta.outputs.tags }}labels: ${{ steps.meta.outputs.labels }}platforms: 'linux/amd64,linux/arm64'
Additional considerations
This is a small part of marking ODK Central compatible with ARM64, when providing pre-built images from Build Docker images in GitHub Actions central#546 (users can already build ODK Central ARM64 themselves).
@lognaturel we already discussed that there is no need for ARM64 support until a user requests it. I actually had a developer wishing to contribute to a tool I maintain that uses pyxform-http as part of the docker-compose stack, using a Macbook M1 for development. They were blocked from doing so by no ARM64 for this image. I don't see much downside to at least having support on pyxform-http only for now 😄
The text was updated successfully, but these errors were encountered:
Issue
docker/build-push-action
(which has multi-arch support), it would be nice to also build for ARM64.Solution
Update the workflow
publish.yml
to include three extra things:platform
key to thedocker/build-push-action
, withlinux/amd64,linux/arm64
specified.Full modified workflow:
Additional considerations
pyxform-http
as part of the docker-compose stack, using a Macbook M1 for development. They were blocked from doing so by no ARM64 for this image. I don't see much downside to at least having support onpyxform-http
only for now 😄The text was updated successfully, but these errors were encountered: