mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 11:41:18 +00:00
15 lines
352 B
Docker
15 lines
352 B
Docker
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/service-init ./cmd/service-init
|
|
|
|
# Runtime Environment
|
|
FROM gcr.io/distroless/static-debian12
|
|
COPY --from=build /bin/service-init .
|
|
CMD ["./service-init"] |