24 lines
393 B
Docker
24 lines
393 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/
|
||
|
COPY --from=builder /go/src/meutel.net/meutel/go-bouquins/app .
|
||
|
COPY templates/ ./templates/
|
||
|
COPY assets/ ./assets/
|
||
|
|
||
|
CMD [ "./app" ]
|
||
|
|
||
|
EXPOSE 8080
|