Changeset 92 in code for trunk/Dockerfile


Ignore:
Timestamp:
Jul 2, 2019, 4:20:01 PM (6 years ago)
Author:
alex
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Dockerfile

    r91 r92  
    11# STEP 1 build executable binary
    2 FROM golang:alpine as builder
     2FROM golang:1.12-alpine as builder
    33
    44WORKDIR $GOPATH/src/github.com/asciimoo/morty
     
    88COPY . .
    99RUN go get -d -v
     10RUN gofmt -l ./
     11#RUN go vet -v ./...
     12#RUN go test -v ./...
    1013RUN go build .
    1114
    1215# STEP 2 build the image including only the binary
    13 FROM alpine:latest
     16FROM alpine:3.10
    1417
    1518EXPOSE 3000
    1619
    17 RUN apk --no-cache add ca-certificates
     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
    1823
    19 RUN adduser -D -h /usr/local/morty -s /bin/sh morty morty
     24COPY --from=builder /go/src/github.com/asciimoo/morty/morty /usr/local/morty/morty
    2025
    2126USER morty
    2227
    23 COPY --from=builder /go/src/github.com/asciimoo/morty/morty /usr/local/morty/morty
    24 
    2528ENTRYPOINT ["/usr/local/morty/morty"]
Note: See TracChangeset for help on using the changeset viewer.