[PR #150] build: publish multi-arch Docker image (linux/amd64, linux/arm64) #169

Open
opened 2026-10-13 21:04:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-go/pull/150
Author: @AlbertShtein
Created: 7/7/2026
Status: 🔄 Open

Base: master ← Head: multiarch-docker-arm64


📝 Commits (1)

  • a5b63eb build: publish multi-arch Docker image (linux/amd64, linux/arm64)

📊 Changes

2 files changed (+12 additions, -6 deletions)

View changed files

📝 .github/workflows/build-if-tag.yml (+4 -0)
📝 Dockerfile (+8 -6)

📄 Description

What

Publish the Docker image for both linux/amd64 and linux/arm64.

Why

The image on Docker Hub is currently amd64-only, so installing AmneziaWG (2.0) from the AmneziaVPN app fails on arm64 servers (Raspberry Pi, AWS Graviton, Oracle Ampere, Hetzner CAX) — the app's docker build --pull pulls an amd64-only base. See #65 (closed) and amnezia-vpn/amnezia-client#869.

The previous attempt (#65) only added platforms: to the workflow, which is not enough: the Dockerfile downloads a prebuilt amd64-only alpine-3.19-amneziawg-tools.zip from GitHub releases, so an arm64 image would still contain amd64 awg/awg-quick binaries.

How

  • Dockerfile: build amneziawg-tools from source (same pinned release tag v1.0.20250901) in a dedicated build stage instead of downloading the zip. The final stage is unchanged in layout: awg, awg-quick, wg/wg-quick symlinks, amneziawg-go. This makes the image buildable for any platform and removes the runtime dependency on release artifacts.
  • Workflow: add docker/setup-qemu-action and platforms: linux/amd64,linux/arm64 to the publish step.
  • Fixes the two FromAsCasing build warnings as a drive-by.

Alternative

If you would rather keep the release-zip download approach, amnezia-vpn/amneziawg-tools#57 adds arm64 zips to the tools release artifacts. Once that is merged and a new tools release is tagged, I'm happy to rework this PR to select the zip by TARGETARCH instead of building from source — building from source is proposed here only because it needs no coordination between the two repos and works for already-published tools tags.

Testing

Built and ran both platforms locally with docker buildx:

  • linux/arm64 (native on Apple Silicon / verified binaries on Raspberry Pi 5): amneziawg-go --version → Userspace AmneziaWG daemon for linux-arm64, awg --version → amneziawg-tools v1.0.20210914, symlinks present.
  • linux/amd64 (no regression): amneziawg-go --version → Userspace AmneziaWG daemon for linux-amd64, awg --version OK.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-go/pull/150 **Author:** [@AlbertShtein](https://github.com/AlbertShtein) **Created:** 7/7/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `multiarch-docker-arm64` --- ### 📝 Commits (1) - [`a5b63eb`](https://github.com/amnezia-vpn/amneziawg-go/commit/a5b63eb1f2e5920f732facd7aebb7fc4cb556bbb) build: publish multi-arch Docker image (linux/amd64, linux/arm64) ### 📊 Changes **2 files changed** (+12 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build-if-tag.yml` (+4 -0) 📝 `Dockerfile` (+8 -6) </details> ### 📄 Description ## What Publish the Docker image for both `linux/amd64` and `linux/arm64`. ## Why The image on Docker Hub is currently amd64-only, so installing AmneziaWG (2.0) from the AmneziaVPN app fails on arm64 servers (Raspberry Pi, AWS Graviton, Oracle Ampere, Hetzner CAX) — the app's `docker build --pull` pulls an amd64-only base. See #65 (closed) and amnezia-vpn/amnezia-client#869. The previous attempt (#65) only added `platforms:` to the workflow, which is not enough: the Dockerfile downloads a prebuilt **amd64-only** `alpine-3.19-amneziawg-tools.zip` from GitHub releases, so an arm64 image would still contain amd64 `awg`/`awg-quick` binaries. ## How - **Dockerfile**: build `amneziawg-tools` from source (same pinned release tag `v1.0.20250901`) in a dedicated build stage instead of downloading the zip. The final stage is unchanged in layout: `awg`, `awg-quick`, `wg`/`wg-quick` symlinks, `amneziawg-go`. This makes the image buildable for any platform and removes the runtime dependency on release artifacts. - **Workflow**: add `docker/setup-qemu-action` and `platforms: linux/amd64,linux/arm64` to the publish step. - Fixes the two `FromAsCasing` build warnings as a drive-by. ## Alternative If you would rather keep the release-zip download approach, amnezia-vpn/amneziawg-tools#57 adds arm64 zips to the tools release artifacts. Once that is merged and a new tools release is tagged, I'm happy to rework this PR to select the zip by `TARGETARCH` instead of building from source — building from source is proposed here only because it needs no coordination between the two repos and works for already-published tools tags. ## Testing Built and ran both platforms locally with `docker buildx`: - `linux/arm64` (native on Apple Silicon / verified binaries on Raspberry Pi 5): `amneziawg-go --version` → `Userspace AmneziaWG daemon for linux-arm64`, `awg --version` → `amneziawg-tools v1.0.20210914`, symlinks present. - `linux/amd64` (no regression): `amneziawg-go --version` → `Userspace AmneziaWG daemon for linux-amd64`, `awg --version` OK. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-go#169
No description provided.