Dockerfile added to build service image
This commit is contained in:
parent
dc8f9ec86a
commit
279500db50
2 changed files with 24 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
*.toml
|
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
FROM golang:1.13 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum /app/
|
||||
RUN go mod download
|
||||
COPY *go /app/
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -tags netgo -o /sendmail ./...
|
||||
|
||||
|
||||
FROM gcr.io/distroless/static
|
||||
|
||||
ENV sm_server ""
|
||||
ENV sm_port "465"
|
||||
ENV sm_user ""
|
||||
ENV sm_password ""
|
||||
ENV sm_from ""
|
||||
ENV sm_to ""
|
||||
ENV sm_sub ""
|
||||
|
||||
COPY --from=builder /sendmail /
|
||||
WORKDIR /
|
||||
|
||||
ENTRYPOINT ["/sendmail"]
|
Loading…
Reference in a new issue