From 82e0bcec8ed25dcd87df7e0c050ff74013bdf4c5 Mon Sep 17 00:00:00 2001 From: Son Date: Mon, 15 Nov 2021 11:13:34 +0100 Subject: [PATCH] add docker build image command for building multi architecture image --- docs/build-image.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/build-image.md diff --git a/docs/build-image.md b/docs/build-image.md new file mode 100644 index 00000000..9eefd967 --- /dev/null +++ b/docs/build-image.md @@ -0,0 +1,15 @@ +To build a multi-architecture image, you need to use `buildx`. + +Here's the command to build and push the images from a Mac M1: + +1) First create a new buildx environment (or context). This is only necessary for the first time. + +```bash +docker buildx create --use +``` + +2) Build and push the image. Replace `simplelogin/name:tag` by the correct docker image name and tag. + +```bash +docker buildx build --platform linux/amd64,linux/arm64 --push -t simplelogin/name:tag +``` \ No newline at end of file