2024-02-15 19:37:06 -05:00
|
|
|
FROM golang:1.22.0 as build
|
2023-03-06 14:01:18 -05:00
|
|
|
|
2023-05-29 18:19:31 -04:00
|
|
|
LABEL author="vlbeaudoin"
|
2023-03-06 14:01:18 -05:00
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
|
2023-05-29 18:19:31 -04:00
|
|
|
COPY go.mod go.sum main.go ./
|
2023-03-06 14:01:18 -05:00
|
|
|
|
2023-05-29 18:19:31 -04:00
|
|
|
ADD cmd/ cmd/
|
|
|
|
ADD data/ data/
|
|
|
|
ADD handlers/ handlers/
|
|
|
|
ADD models/ models/
|
2023-06-02 16:36:08 -04:00
|
|
|
ADD responses/ responses/
|
2023-05-29 18:19:31 -04:00
|
|
|
ADD web/ web/
|
2023-03-06 14:01:18 -05:00
|
|
|
|
2023-05-29 18:19:31 -04:00
|
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o bottin .
|
2023-03-06 14:01:18 -05:00
|
|
|
|
2023-05-29 18:19:31 -04:00
|
|
|
# Alpine
|
|
|
|
|
2024-02-15 19:38:02 -05:00
|
|
|
FROM alpine:3.19
|
2023-05-29 18:19:31 -04:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=build /go/src/app/bottin /usr/bin/bottin
|
|
|
|
|
|
|
|
CMD ["bottin", "--help"]
|