yukari/Dockerfile
alex 5233db62d8 Dockerfile : Various modifications
- the key is base64 encoded /!\ break compatibility, see searx project PR #1629
- make sure to use golang:1.12-alpine to build morty to support TLS 1.3 (from morty to external)

git-svn-id: file:///srv/svn/repo/yukari/trunk@92 f3bd38d9-da89-464d-a02a-eb04e43141b5
2019-07-02 16:20:01 +00:00

29 lines
593 B
Docker

# STEP 1 build executable binary
FROM golang:1.12-alpine as builder
WORKDIR $GOPATH/src/github.com/asciimoo/morty
RUN apk add --no-cache git
COPY . .
RUN go get -d -v
RUN gofmt -l ./
#RUN go vet -v ./...
#RUN go test -v ./...
RUN go build .
# STEP 2 build the image including only the binary
FROM alpine:3.10
EXPOSE 3000
RUN apk --no-cache add ca-certificates \
&& rm -f /var/cache/apk/* \
&& adduser -D -h /usr/local/morty -s /bin/false morty morty
COPY --from=builder /go/src/github.com/asciimoo/morty/morty /usr/local/morty/morty
USER morty
ENTRYPOINT ["/usr/local/morty/morty"]