🐛 Declaring BUILDPLATFORM before usage on Dockerfile + default substitution

This commit is contained in:
Daniel Aloni 2023-03-15 18:20:02 +02:00
parent 5af369f426
commit e16a7363e7
2 changed files with 3 additions and 0 deletions

View file

@ -7,6 +7,8 @@ steps:
- CLOUDSDK_CORE_PROJECT=globekeeper-development
- CLOUDSDK_COMPUTE_ZONE=europe-west2-a
- CLOUDSDK_CONTAINER_CLUSTER=synapse
substitutions:
_BUILD_PLATFORM: linux/amd64 # default
images:
- gcr.io/$PROJECT_ID/dendrite-monolith:$COMMIT_SHA
timeout: 480s

View file

@ -1,6 +1,7 @@
#
# base installs required dependencies and runs go mod download to cache dependencies
#
ARG BUILDPLATFORM=${BUILDPLATFORM}
FROM --platform=${BUILDPLATFORM} docker.io/golang:1.20-alpine AS base
RUN apk --update --no-cache add bash build-base curl