20 lines
763 B
Docker
20 lines
763 B
Docker
# syntax=docker/dockerfile:1.7
|
|
FROM golang:1.26-alpine AS build
|
|
WORKDIR /src
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
COPY go.mod ./
|
|
COPY third_party ./third_party
|
|
COPY cmd ./cmd
|
|
COPY internal ./internal
|
|
COPY bulkweb ./bulkweb
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/ai-disclosure-bulk ./cmd/bulk
|
|
|
|
FROM scratch
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
|
|
COPY --from=build /out/ai-disclosure-bulk /ai-disclosure-bulk
|
|
USER 65532:65532
|
|
EXPOSE 8081
|
|
ENV BULK_LISTEN_ADDRESS=:8081 CORE_INTERNAL_URL=http://app:8080 DISCLOSURE_BASE_URL=http://localhost:8080 GENERATOR_URL=http://localhost:8080
|
|
ENTRYPOINT ["/ai-disclosure-bulk"]
|