All checks were successful
release-tag / release-image (push) Successful in 2m40s
24 lines
493 B
Docker
24 lines
493 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM golang:1.26-bookworm AS builder
|
|
WORKDIR /src
|
|
|
|
COPY go.mod ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o /out/trading-tool ./cmd/server
|
|
|
|
FROM gcr.io/distroless/static-debian13:nonroot
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /out/trading-tool /app/trading-tool
|
|
COPY web /app/web
|
|
COPY migrations /app/migrations
|
|
|
|
ENV APP_ADDR=:8080
|
|
EXPOSE 8080
|
|
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/app/trading-tool"]
|