go-bouquins/Dockerfile
2019-07-03 20:08:23 +02:00

25 lines
514 B
Docker

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/
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install ca-certificates && update-ca-certificates -f
COPY --from=builder /go/src/meutel.net/meutel/go-bouquins/app .
COPY templates/ ./templates/
COPY assets/ ./assets/
CMD [ "./app" ]
EXPOSE 8080