ms-auth/Dockerfile
Vyacheslav1557 73852d3350 refactor:
2024-08-14 15:36:43 +05:00

15 lines
426 B
Docker

FROM golang:1.22-alpine AS base
WORKDIR /src
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x
FROM base AS builder
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,target=. \
go build -o /bin/server .
FROM scratch AS runner
COPY --from=builder /bin/server /bin/
ENTRYPOINT [ "/bin/server" ]