Add billing service container build
This commit is contained in:
parent
3570240c69
commit
8a18e547fc
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
FROM golang:1.25.1-alpine AS builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY cmd ./cmd
|
||||
COPY internal ./internal
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/billing-service ./cmd/billing-service
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN addgroup -S app && adduser -S app -G app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /out/billing-service /app/billing-service
|
||||
|
||||
USER app
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
ENTRYPOINT ["/app/billing-service"]
|
||||
Loading…
Reference in New Issue
Block a user