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

16 lines
389 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/warehouse-service ./cmd/warehouse-service
# Runtime Environment
FROM gcr.io/distroless/static-debian12
COPY --from=build /bin/warehouse-service .
EXPOSE 90 9090
CMD ["./warehouse-service"]