1
0
mirror of https://github.com/hexolan/stocklet.git synced 2026-12-01 03:09:10 +00:00
Files
stocklet/build/order-service/Dockerfile
2026-11-19 19:29:59 +00:00

16 lines
373 B
Docker

FROM golang:1.27.4 AS build
WORKDIR /app
# Install required modules
COPY go.mod go.sum ./
RUN go mod download
# Build the service
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/order-service ./cmd/order-service
# Runtime Environment
FROM gcr.io/distroless/static-debian12
COPY --from=build /bin/order-service .
EXPOSE 90 9090
CMD ["./order-service"]