bottin/Dockerfile
Victor Lacasse-Beaudoin eca6672746 Update golang et alpine
2023-09-18 22:04:54 -04:00

26 lines
406 B
Docker

FROM golang:1.21.1 as build
LABEL author="vlbeaudoin"
WORKDIR /go/src/app
COPY go.mod go.sum main.go ./
ADD cmd/ cmd/
ADD data/ data/
ADD handlers/ handlers/
ADD models/ models/
ADD responses/ responses/
ADD web/ web/
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o bottin .
# Alpine
FROM alpine:3.18
WORKDIR /app
COPY --from=build /go/src/app/bottin /usr/bin/bottin
CMD ["bottin", "--help"]