From 29575343ca61461f0a07b334c688664d6e3ac47d Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Fri, 19 Apr 2024 02:37:12 -0700 Subject: [PATCH] Update CONTRIBUTING.md for how to set up a Docker builder (#4668) Co-authored-by: Frank Elsinga --- CONTRIBUTING.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9c0952cb..53f199211 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -490,3 +490,28 @@ We have a few procedures we follow. These are documented here:

+ +### Set up a Docker Builder + +- amd64, armv7 using local. +- arm64 using remote arm64 cpu, as the emulator is too slow and can no longer pass the `npm ci` command. + 1. Add the public key to the remote server. + 2. Add the remote context. The remote machine must be arm64 and installed Docker CE. + ``` + docker context create oracle-arm64-jp --docker "host=ssh://root@100.107.174.88" + ``` + 3. Create a new builder. + ``` + docker buildx create --name kuma-builder --platform linux/amd64,linux/arm/v7 + docker buildx use kuma-builder + docker buildx inspect --bootstrap + ``` + 4. Append the remote context to the builder. + ``` + docker buildx create --append --name kuma-builder --platform linux/arm64 oracle-arm64-jp + ``` + 5. Verify the builder and check if the builder is using `kuma-builder`. + ``` + docker buildx inspect kuma-builder + docker buildx ls + ```