diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-01-20 10:31:58 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2024-01-20 10:31:58 +0100 |
commit | d2580f0a3815c5d5ec452fceac3b2cd34c7d57c0 (patch) | |
tree | b5f4422071de5d5a6302a93f0c74d8c34aec0d3f /doc | |
parent | e7045f6b32b0d49976472de84b37f31b2f204142 (diff) |
buildx and cross-compilation support
Diffstat (limited to 'doc')
-rw-r--r-- | doc/docker.md | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/docker.md b/doc/docker.md index 7be7ab1..6af77c5 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -11,13 +11,15 @@ For example, you can add a `:devel` suffix for development builds, though remember to refer the image using that name in compose files or the `docker run` command. +The images are intended to be built by the default buildx builder. + ### Regular To build an image of the latest commit, run the following command from the repository root: ``` -docker build -t mt-multiserver-proxy . +docker buildx build -t mt-multiserver-proxy --load . ``` This is the version most people will want. @@ -25,7 +27,7 @@ This is the version most people will want. It is also possible to build a specific version into an image: ``` -docker build -t mt-multiserver-proxy --build-arg version=VERSION . +docker buildx build -t mt-multiserver-proxy --load --build-arg version=VERSION . ``` where `VERSION` is a Go pseudo-version. @@ -36,7 +38,17 @@ To build an image of the checked-out commit, run the following command from the repository root: ``` -docker build -t mt-multiserver-proxy -f devel.Dockerfile . +docker buildx build -t mt-multiserver-proxy --load -f devel.Dockerfile . +``` + +### Cross-compilation + +You can add the `--platform linux/ARCH` argument to any of the build commands. + +Example (ARMv8 64-bit): + +``` +docker buildx build --platform linux/arm64 -t mt-multiserver-proxy --load . ``` ## Run |