mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
Bump all service in 1.20 - go.mod - Dev: Dockerfile Co-authored-by: David Ragot <[email protected]>
22 lines
855 B
Docker
22 lines
855 B
Docker
# Build the manager binary
|
|
FROM golang:1.20-alpine as builder
|
|
WORKDIR /src
|
|
ENV CGO_ENABLED=0
|
|
COPY libs/go-libs libs/go-libs
|
|
COPY components/payments components/payments
|
|
COPY components/search components/search
|
|
COPY components/operator components/operator
|
|
WORKDIR /src/components/operator
|
|
RUN --mount=type=cache,id=gobuild,target=/root/.cache/go-build \
|
|
--mount=type=cache,id=gomodcache,target=/go/pkg/mod \
|
|
go build -v -a -o manager main.go
|
|
|
|
# Use distroless as minimal base image to package the manager binary
|
|
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
|
FROM gcr.io/distroless/static:nonroot as release
|
|
LABEL org.opencontainers.image.source=https://github.com/formancehq/operator
|
|
WORKDIR /
|
|
COPY --from=builder /src/components/operator/manager /usr/bin/operator
|
|
USER 65532:65532
|
|
ENTRYPOINT ["/usr/bin/operator"]
|