22 lines
418 B
Docker
22 lines
418 B
Docker
FROM golang:1.22.3 as build
|
|
|
|
LABEL author="vlbeaudoin"
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum client.go client_test.go cmd.go config.go db.go entity.go main.go request.go response.go routes.go template.go ./
|
|
|
|
ADD sql/ sql/
|
|
ADD templates/ templates/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -o bottin .
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:3.20.3
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /go/src/app/bottin /usr/bin/bottin
|
|
|
|
CMD ["bottin", "--help"]
|