From 190ce19eca840f5002e6fc213cf3ec0d2fdd5ec5 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Mon, 1 Apr 2024 11:17:12 -0300 Subject: [PATCH] build: instructions regarding binfmt --- CONTRIBUTING.md | 10 ++++++++++ Taskfile.yml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a5e912f..dd82aca5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,6 +38,16 @@ If on the ARM tests you are seeing `standard_init_linux.go:211: exec user proces sudo docker run --rm --privileged hypriot/qemu-register ``` +### A note about Docker multi-arch builds + +If you want to properly run the Docker tests, or run `goreleaser release +--snapshot` locally, you might need to setup Docker for it. +You can do so by running: + +```sh +task docker:setup +``` + ## Test your change You can create a branch for your changes and try to build from the source as you go: diff --git a/Taskfile.yml b/Taskfile.yml index 1a634af0..0b54c506 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -17,6 +17,11 @@ tasks: cmds: - go mod tidy + docker:setup: + desc: Setup Docker for multi-arch image builds + cmds: + - docker run --privileged --rm tonistiigi/binfmt --install all + build: desc: Build the binary sources: