Skip to content

Commit 376c83d

Browse files
committed
fix: target arch in build
1 parent 36506f8 commit 376c83d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Base stage, sets up the GRPC Health Probe, we use a ubuntu image because no devcontainer features work on alpine
22
ARG GO_VERSION
3+
FROM golang:${GO_VERSION} AS builder_base
4+
5+
# Needed to get the right grpc_health_probe binary
36
ARG TARGETOS
47
ARG TARGETARCH
5-
FROM golang:${GO_VERSION} AS builder_base
68

79
WORKDIR /app
810

911
# Install gRPC Health Probe
1012
RUN set -ex \
11-
&& curl -fSL "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.19/grpc_health_probe-$TARGETOS-$TARGETARCH -o /usr/local/bin/grpc_health_probe" \
13+
&& curl -fSL "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.19/grpc_health_probe-${TARGETOS}-${TARGETARCH}" -o /usr/local/bin/grpc_health_probe \
1214
&& chmod +x /usr/local/bin/grpc_health_probe
1315

1416
#######################################################
@@ -51,7 +53,7 @@ ENTRYPOINT [ "./docker/test-container.sh" ]
5153
# Builds the production binary
5254
FROM golang:${GO_VERSION}-alpine AS builder_production
5355

54-
WORKDIR /app
56+
WORKDIR /app
5557

5658
# Go dependencies
5759
COPY go.mod go.sum ./

0 commit comments

Comments
 (0)