Skip to content

Commit

Permalink
Add initial Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Dec 18, 2018
1 parent e5c2173 commit 0067b5d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.travis.yml
Dockerfile
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM golang:alpine as build
RUN apk --no-cache --update upgrade && apk --no-cache add git

ADD . /go/src/github.com/mback2k/smtp-dkim-signer
WORKDIR /go/src/github.com/mback2k/smtp-dkim-signer

RUN go get
RUN go build -ldflags="-s -w"
RUN chmod +x smtp-dkim-signer

FROM alpine:latest
RUN apk --no-cache --update upgrade && apk --no-cache add ca-certificates

COPY --from=build /go/src/github.com/mback2k/smtp-dkim-signer/smtp-dkim-signer /usr/local/bin/smtp-dkim-signer

RUN addgroup -S serve
RUN adduser -h /data -S -D -G serve serve

WORKDIR /data
USER serve

CMD [ "/usr/local/bin/smtp-dkim-signer" ]

0 comments on commit 0067b5d

Please sign in to comment.