summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorLibravatar Forest Johnson <forest.n.johnson@gmail.com>2022-11-22 11:17:41 +0000
committerLibravatar GitHub <noreply@github.com>2022-11-22 12:17:41 +0100
commit6d43319fe19b19d2b89a8c877f8fb4674e9066af (patch)
treeece3cd30662af0bc11746a17581d25398984d7cc /Dockerfile
parent[chore] markdown: disable Smartypants rendering (#1111) (diff)
downloadgotosocial-6d43319fe19b19d2b89a8c877f8fb4674e9066af.tar.xz
[docs] Document non-buildx cross compilation for docker image (#1115)
* Enable / document cross compilation for docker image * remove sudo * explain whats up with BUILDPLATFORM/TARGETPLATFORM
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index abb8c1947..9edc86851 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,12 @@
# syntax=docker/dockerfile:1.3
# Dockerfile reference: https://docs.docker.com/engine/reference/builder/
+# When using buildx, these variables will be set by the tool:
+# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
+# However, declaring them as build arguments like this allows them to be set manually with `--build-arg` as well.
+ARG BUILDPLATFORM
+ARG TARGETPLATFORM
+
# stage 1: generate up-to-date swagger.yaml to put in the final container
FROM --platform=${BUILDPLATFORM} quay.io/goswagger/swagger:v0.30.0 AS swagger