Skip to content

Commit

Permalink
fix: set default values for architectures (#209)
Browse files Browse the repository at this point in the history
* fix: set default values for architectures

* fix: set default values
  • Loading branch information
kuisathaverat authored Jun 3, 2022
1 parent 831fe5e commit a98000c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions go/arm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ RUN apt install -y \
libsystemd-dev
{{- end }}



# Declare TARGETARCH to make it available
ARG TARGETARCH
ARG TARGETARCH=amd64
# Select final stage based on TARGETARCH ARG
FROM stage-${TARGETARCH} as final

Expand Down
4 changes: 2 additions & 2 deletions go/darwin-arm64/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ARG TAG_EXTENSION=''
FROM --platform=linux/amd64 docker.elastic.co/beats-dev/golang-crossbuild:llvm-apple-debian{{ .DEBIAN_VERSION }}-amd64 AS build-llvm-apple-amd64
FROM --platform=linux/arm64 docker.elastic.co/beats-dev/golang-crossbuild:llvm-apple-debian{{ .DEBIAN_VERSION }}-arm64 AS build-llvm-apple-arm64
# workaround to https://github.com/moby/moby/issues/34482
ARG TARGETARCH
ARG BUILDARCH
ARG TARGETARCH=amd64
ARG BUILDARCH=amd64
FROM build-llvm-apple-${TARGETARCH} as build-llvm-apple
ARG TARGETARCH
ARG BUILDARCH
Expand Down
4 changes: 2 additions & 2 deletions go/darwin/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ARG TAG_EXTENSION=''
FROM --platform=linux/amd64 docker.elastic.co/beats-dev/golang-crossbuild:llvm-apple-debian{{ .DEBIAN_VERSION }}-amd64 AS build-llvm-apple-amd64
FROM --platform=linux/arm64 docker.elastic.co/beats-dev/golang-crossbuild:llvm-apple-debian{{ .DEBIAN_VERSION }}-arm64 AS build-llvm-apple-arm64
# workaround to https://github.com/moby/moby/issues/34482
ARG TARGETARCH
ARG BUILDARCH
ARG TARGETARCH=amd64
ARG BUILDARCH=amd64
FROM build-llvm-apple-${TARGETARCH} as build-llvm-apple
ARG TARGETARCH
ARG BUILDARCH
Expand Down

0 comments on commit a98000c

Please sign in to comment.