All checks were successful
Docker Build / build-and-push-image (push) Successful in 1m8s
23 lines
450 B
Docker
23 lines
450 B
Docker
FROM golang:1.23-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o gateway .
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add ca-certificates && \
|
|
addgroup -g 65532 -S app && \
|
|
adduser -u 65532 -S app -G app
|
|
|
|
WORKDIR /home/app
|
|
COPY --from=builder /app/gateway /usr/local/bin/gateway
|
|
|
|
USER 65532:65532
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/usr/local/bin/gateway"]
|
|
CMD ["serve"]
|