bottin/Dockerfile

24 lines
356 B
Text
Raw Normal View History

2024-06-06 01:40:56 -04:00
FROM golang:1.22.3 as build
2023-03-06 14:01:18 -05:00
LABEL author="vlbeaudoin"
2023-03-06 14:01:18 -05:00
WORKDIR /go/src/app
2024-06-06 01:40:56 -04:00
COPY go.mod go.sum db.go entity.go main.go responses.go ./
2023-03-06 14:01:18 -05:00
ADD cmd/ cmd/
2024-06-06 01:40:56 -04:00
ADD sql/ sql/
ADD templates/ templates/
2023-03-06 14:01:18 -05:00
2024-06-06 01:40:56 -04:00
RUN CGO_ENABLED=0 go build -a -o bottin .
2023-03-06 14:01:18 -05:00
# Alpine
2024-06-06 01:40:56 -04:00
FROM alpine:3.20
WORKDIR /app
COPY --from=build /go/src/app/bottin /usr/bin/bottin
CMD ["bottin", "--help"]