bottin/Dockerfile

23 lines
356 B
Docker

FROM golang:1.22.3 as build
LABEL author="vlbeaudoin"
WORKDIR /go/src/app
COPY go.mod go.sum db.go entity.go main.go responses.go ./
ADD cmd/ cmd/
ADD sql/ sql/
ADD templates/ templates/
RUN CGO_ENABLED=0 go build -a -o bottin .
# Alpine
FROM alpine:3.20
WORKDIR /app
COPY --from=build /go/src/app/bottin /usr/bin/bottin
CMD ["bottin", "--help"]