initial commit
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
FROM golang:1.24-alpine AS build
|
||||
|
||||
WORKDIR /src
|
||||
COPY go.mod ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go mod tidy
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/inventory-cdc-demo ./cmd/server
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN adduser -D -H app
|
||||
USER app
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/inventory-cdc-demo /app/inventory-cdc-demo
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/app/inventory-cdc-demo"]
|
||||
Reference in New Issue
Block a user