Skip to content

Commit

Permalink
fix: target arch in build
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTWF committed Dec 19, 2023
1 parent 36506f8 commit 376c83d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Base stage, sets up the GRPC Health Probe, we use a ubuntu image because no devcontainer features work on alpine
ARG GO_VERSION
FROM golang:${GO_VERSION} AS builder_base

# Needed to get the right grpc_health_probe binary
ARG TARGETOS
ARG TARGETARCH
FROM golang:${GO_VERSION} AS builder_base

WORKDIR /app

# Install gRPC Health Probe
RUN set -ex \
&& 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" \
&& 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 \
&& chmod +x /usr/local/bin/grpc_health_probe

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

WORKDIR /app
WORKDIR /app

# Go dependencies
COPY go.mod go.sum ./
Expand Down

0 comments on commit 376c83d

Please sign in to comment.