https://github.com/nicolas-van/github-actions-multiarch-docker-image-build
An example Github Actions configuration to build a Docker image for multiple architectures.
https://github.com/nicolas-van/github-actions-multiarch-docker-image-build
docker multiarch
Last synced: about 2 months ago
JSON representation
An example Github Actions configuration to build a Docker image for multiple architectures.
- Host: GitHub
- URL: https://github.com/nicolas-van/github-actions-multiarch-docker-image-build
- Owner: nicolas-van
- License: mit
- Created: 2022-01-22T10:41:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-04T12:59:49.000Z (over 3 years ago)
- Last Synced: 2025-04-23T03:16:54.918Z (6 months ago)
- Topics: docker, multiarch
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# github-actions-arm64-docker-image-build
[](https://github.com/nicolas-van/github-actions-multiarch-docker-image-build/actions/workflows/docker-multiarch-image.yml)
An example Github Actions configuration to build a Docker image for the following architectures:
* linux/amd64 (typical x86-64 architecture)
* linux/arm64 (t4g instances on AWS)
* linux/arm/v7 (newer Raspberry Pis)
* linux/arm/v6 (older Raspberry Pis)You can see the workflow configuration here: [`.github/workflows/docker-multiarch-image.yml`](./.github/workflows/docker-multiarch-image.yml). It should work for most projects as long as a `Dockerfile` exists at the root of the repository. Builds for all architectures are performed on every push and they are published to Github Packages on tags.
This repository builds an example http server in Node.js displaying a "Hello World" for these four architectures. It was tested on the following machines:
* An x86-64 Windows using Docker for Windows.
* An AWS t4g instance using an ARM64 processor.No tests were performed on Raspberry Pis until now because I'm lazy.
You can test these images yourself by using this command:
```bash
docker run --rm -it -p 8080:8080 ghcr.io/nicolas-van/github-actions-multiarch-docker-image-build:latest
```It will run the Docker image and you should be able to see the "Hello World" message by connecting to port `8080` using your web browser.
You can also see metadata about the published Docker images in the [Package page](https://github.com/nicolas-van/github-actions-multiarch-docker-image-build/pkgs/container/github-actions-multiarch-docker-image-build).