diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2667574 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +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/ +COPY --from=builder /go/src/meutel.net/meutel/go-bouquins/app . +COPY templates/ ./templates/ +COPY assets/ ./assets/ + +CMD [ "./app" ] + +EXPOSE 8080