forked from drew/smtprelay
add Dockerfile for smtprelay
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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 .
|
||||
|
||||
# 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."
|
||||
|
||||
COPY --from=builder /project/smtprelay /
|
||||
|
||||
# Command to run
|
||||
ENTRYPOINT ["/smtprelay"]
|
||||
Reference in New Issue
Block a user