source: code/trunk/Dockerfile@ 92

Last change on this file since 92 was 92, checked in by alex, 6 years ago

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)
File size: 593 bytes
Line 
1# STEP 1 build executable binary
2FROM golang:1.12-alpine as builder
3
4WORKDIR $GOPATH/src/github.com/asciimoo/morty
5
6RUN apk add --no-cache git
7
8COPY . .
9RUN go get -d -v
10RUN gofmt -l ./
11#RUN go vet -v ./...
12#RUN go test -v ./...
13RUN go build .
14
15# STEP 2 build the image including only the binary
16FROM alpine:3.10
17
18EXPOSE 3000
19
20RUN apk --no-cache add ca-certificates \
21 && rm -f /var/cache/apk/* \
22 && adduser -D -h /usr/local/morty -s /bin/false morty morty
23
24COPY --from=builder /go/src/github.com/asciimoo/morty/morty /usr/local/morty/morty
25
26USER morty
27
28ENTRYPOINT ["/usr/local/morty/morty"]
Note: See TracBrowser for help on using the repository browser.