From bc4a31817eae7d31ef80a53e69ce405ca82aa8e0 Mon Sep 17 00:00:00 2001 From: Drew Bowering Date: Wed, 26 Nov 2025 14:34:43 -0700 Subject: [PATCH] add explicit binary locations - Container image seemed to be build without the binary in the right place to run. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2bf32d7..87ea7ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN go build -buildvcs=false . +RUN go build -buildvcs=false -o /smtprelay # Stage 2: Package FROM scratch @@ -16,7 +16,8 @@ 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 / +WORKDIR / +COPY --from=builder /smtprelay /smtprelay # Command to run ENTRYPOINT ["/smtprelay"]