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"]