Skip to content

Commit

Permalink
fix: ARG ARCH to TARGETARCH for multi platform by docker buildx
Browse files Browse the repository at this point in the history
Signed-off-by: Morlay <morlay.null@gmail.com>
  • Loading branch information
morlay committed Jun 30, 2020
1 parent 83fabe3 commit eadc165
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/all-in-one/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:latest as certs
RUN apk add --update --no-cache ca-certificates

FROM scratch
ARG ARCH=amd64
ARG TARGETARCH=amd64

COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

Expand All @@ -27,7 +27,7 @@ EXPOSE 14250
# Web HTTP
EXPOSE 16686

COPY all-in-one-linux-$ARCH /go/bin/all-in-one-linux
COPY all-in-one-linux-$TARGETARCH /go/bin/all-in-one-linux
COPY sampling_strategies.json /etc/jaeger/

VOLUME ["/tmp"]
Expand Down
4 changes: 2 additions & 2 deletions cmd/opentelemetry/cmd/all-in-one/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ FROM alpine:latest as certs
RUN apk add --update --no-cache ca-certificates

FROM scratch
ARG ARCH=amd64
ARG TARGETARCH=amd64

COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY opentelemetry-all-in-one-linux-$ARCH /go/bin/opentelemetry-all-in-one-linux
COPY opentelemetry-all-in-one-linux-$TARGETARCH /go/bin/opentelemetry-all-in-one-linux
ENTRYPOINT ["/go/bin/opentelemetry-all-in-one-linux"]
4 changes: 2 additions & 2 deletions scripts/travis/build-all-in-one-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ upload_to_docker() {

make build-all-in-one GOOS=linux GOARCH=$GOARCH
repo=jaegertracing/all-in-one
docker build -f cmd/all-in-one/Dockerfile -t $repo:latest cmd/all-in-one --build-arg ARCH=$GOARCH
docker build -f cmd/all-in-one/Dockerfile -t $repo:latest cmd/all-in-one --build-arg TARGETARCH=$GOARCH
run_integration_test $repo
upload_to_docker $repo

make build-otel-all-in-one GOOS=linux GOARCH=$GOARCH
repo=jaegertracing/opentelemetry-all-in-one
docker build -f cmd/opentelemetry/cmd/all-in-one/Dockerfile -t $repo:latest cmd/opentelemetry/cmd/all-in-one --build-arg ARCH=$GOARCH
docker build -f cmd/opentelemetry/cmd/all-in-one/Dockerfile -t $repo:latest cmd/opentelemetry/cmd/all-in-one --build-arg TARGETARCH=$GOARCH
run_integration_test $repo
upload_to_docker $repo

0 comments on commit eadc165

Please sign in to comment.