Files
inventory-flo-debezium-nats/Dockerfile
T
2026-08-11 20:42:44 +01:00

20 lines
380 B
Docker

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"]