Skip to content

Instantly share code, notes, and snippets.

@nicewook
Created June 16, 2022 08:58
Show Gist options
  • Save nicewook/118f4f52b76030f8e69aebbd5ea58168 to your computer and use it in GitHub Desktop.
Save nicewook/118f4f52b76030f8e69aebbd5ea58168 to your computer and use it in GitHub Desktop.
from scratch
# START: probes
# START: beginning
FROM golang:1.18-alpine AS build
WORKDIR /go/src/proglog
COPY . .
RUN CGO_ENABLED=0 go build -o /go/bin/proglog ./cmd/proglog
# END: beginning
# START_HIGHLIGHT
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.1 && \
wget -qO /go/bin/grpc_health_probe \
https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /go/bin/grpc_health_probe
# END_HIGHLIGHT
# START: beginning
FROM alpine
COPY --from=build /go/bin/proglog /bin/proglog
# END: beginning
# START_HIGHLIGHT
COPY --from=build /go/bin/grpc_health_probe /bin/grpc_health_probe
# END_HIGHLIGHT
# START: beginning
ENTRYPOINT ["/bin/proglog"]
# END: beginning
# END: probes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment