mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 19:51:17 +00:00
chore: initial commit
This commit is contained in:
16
build/product-service/Dockerfile
Normal file
16
build/product-service/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM golang:1.22 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/product-service ./cmd/product-service
|
||||
|
||||
# Runtime Environment
|
||||
FROM gcr.io/distroless/static-debian12
|
||||
COPY --from=build /bin/product-service .
|
||||
EXPOSE 90 9090
|
||||
CMD ["./product-service"]
|
||||
Reference in New Issue
Block a user