mirror of
https://github.com/decke/smtprelay.git
synced 2025-12-26 03:22:29 -07:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
45a3870f8c
|
|||
|
02b9072bd2
|
|||
|
796b54a565
|
|||
|
bc4a31817e
|
|||
|
55f941c7a1
|
|||
|
b30d51e9a3
|
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Package versions
|
||||||
|
ARG GOLANG_VERSION="1.25.5"
|
||||||
|
|
||||||
|
# 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 CGO_ENABLED=0 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"]
|
||||||
Reference in New Issue
Block a user