22 lines
410 B
Docker
22 lines
410 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM golang:1.20.5-alpine AS build-stage
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY *.go ./
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /woodpecker-config-service
|
|
|
|
|
|
FROM gcr.io/distroless/base-debian11 AS build-release-stage
|
|
|
|
WORKDIR /
|
|
COPY --from=build-stage /woodpecker-config-service /woodpecker-config-service
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["/woodpecker-config-service"] |