go-bouquins/Dockerfile

25 lines
514 B
Docker
Raw Normal View History

2019-07-02 18:16:13 +00:00
FROM golang as builder
WORKDIR /go/src/meutel.net/meutel/go-bouquins
COPY . .
RUN go get .
RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o app .
# deployment image
FROM debian:stable-slim
LABEL author="Meutel"
WORKDIR /root/
2019-07-03 18:08:23 +00:00
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install ca-certificates && update-ca-certificates -f
2019-07-02 18:16:13 +00:00
COPY --from=builder /go/src/meutel.net/meutel/go-bouquins/app .
COPY templates/ ./templates/
COPY assets/ ./assets/
CMD [ "./app" ]
EXPOSE 8080