mirror of
https://github.com/hexolan/panels.git
synced 2026-03-26 20:41:15 +00:00
16 lines
403 B
Docker
16 lines
403 B
Docker
FROM golang:1.20 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/gateway-service ./cmd/gateway-service
|
|
|
|
# Runtime environment (for minifying image size)
|
|
FROM gcr.io/distroless/static-debian12
|
|
COPY --from=build /bin/gateway-service .
|
|
EXPOSE 3000
|
|
CMD ["./gateway-service"] |