29 lines
528 B
Docker
29 lines
528 B
Docker
FROM golang:1.21.1 as build
|
|
|
|
LABEL author="vlbeaudoin"
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum main.go ./
|
|
|
|
ADD apiclient/ apiclient/
|
|
ADD apierror/ apierror/
|
|
ADD apihandler/ apihandler/
|
|
ADD apiresponse/ apiresponse/
|
|
ADD cmd/ cmd/
|
|
ADD config/ config/
|
|
ADD dbclient/ dbclient/
|
|
ADD webcontent/ webcontent/
|
|
ADD webhandler/ webhandler/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o bottin-ag .
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:3.18.3
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /go/src/app/bottin-ag /usr/bin/bottin-ag
|
|
|
|
CMD ["bottin-ag", "--help"]
|