2
0
forked from drew/smtprelay
Files
smtprelay/Dockerfile
Drew Bowering bc4a31817e add explicit binary locations
- Container image seemed to be build without the binary in the right place to run.
2025-11-26 14:34:43 -07:00

24 lines
564 B
Docker

# Package versions
ARG GOLANG_VERSION="1.25.4"
# Stage 1: Build
FROM core.harbor.brds.ca/library/golang:${GOLANG_VERSION} AS builder
WORKDIR /project
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -buildvcs=false -o /smtprelay
# Stage 2: Package
FROM scratch
LABEL org.opencontainers.image.title="smtprelay"
LABEL org.opencontainers.image.authors="drew@brds.ca"
LABEL org.opencontainers.image.description="Image containing the smtprelay program."
WORKDIR /
COPY --from=builder /smtprelay /smtprelay
# Command to run
ENTRYPOINT ["/smtprelay"]