diff --git a/Dockerfile b/Dockerfile index 842847bc63d..5cb5ba1a57e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/golang:1.18.4-alpine@sha256:46f1fa18ca1ec228f7ea4978ad717f0a8c5e51436e7b8efaf64011f7729886df AS builder +FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/library/busybox:1.35.0 as builder RUN mkdir /.cache && touch -t 202101010000.00 /.cache ARG TARGETOS=linux @@ -7,12 +7,8 @@ ARG TARGETVARIANT=v1 # renovate: datasource=go depName=github.com/grpc-ecosystem/grpc-health-probe ARG GRPC_HEALTH_PROBE_VERSION=v0.4.11 - -RUN go install "github.com/grpc-ecosystem/grpc-health-probe@${GRPC_HEALTH_PROBE_VERSION}" -# Predicatable path for copying over to final image -RUN if [ "$(go env GOHOSTARCH)" != "$(go env GOARCH)" ]; then \ - mv "$(go env GOPATH)/bin/$(go env GOOS)_$(go env GOARCH)/grpc-health-probe" "$(go env GOPATH)/bin/grpc-health-probe"; \ - fi +RUN wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-${TARGETOS}-${TARGETARCH} +RUN chmod +x /bin/grpc_health_probe WORKDIR /app COPY dist dist @@ -31,7 +27,7 @@ FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/alpine:3.16.0@sha256 USER nobody -COPY --chown=0:0 --from=builder /go/bin/grpc-health-probe / +COPY --chown=0:0 --from=builder /bin/grpc_health_probe / COPY --chown=0:0 --from=builder /app/parca /parca COPY --chown=0:0 parca.yaml /parca.yaml diff --git a/deploy/lib/parca/parca.libsonnet b/deploy/lib/parca/parca.libsonnet index db8dec29ee5..d9563eb29fa 100644 --- a/deploy/lib/parca/parca.libsonnet +++ b/deploy/lib/parca/parca.libsonnet @@ -232,13 +232,13 @@ function(params) { livenessProbe: if prc.config.livenessProbe == true then { initialDelaySeconds: 5, exec: { - command: ['/grpc-health-probe', '-v', '-addr=:' + prc.config.port], + command: ['/grpc_health_probe', '-v', '-addr=:' + prc.config.port], }, }, readinessProbe: if prc.config.readinessProbe == true then { initialDelaySeconds: 10, exec: { - command: ['/grpc-health-probe', '-v', '-addr=:' + prc.config.port], + command: ['/grpc_health_probe', '-v', '-addr=:' + prc.config.port], }, }, };