2023-09-15 13:14:43 -04:00
|
|
|
FROM golang:1.21.1 as build
|
|
|
|
|
|
|
|
LABEL author="vlbeaudoin"
|
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
|
|
|
|
COPY go.mod go.sum main.go ./
|
|
|
|
|
2023-09-15 18:16:39 -04:00
|
|
|
ADD apiclient/ apiclient/
|
|
|
|
ADD apierror/ apierror/
|
|
|
|
ADD apihandler/ apihandler/
|
|
|
|
ADD apiresponse/ apiresponse/
|
2023-09-15 13:14:43 -04:00
|
|
|
ADD cmd/ cmd/
|
|
|
|
ADD config/ config/
|
2023-09-15 18:16:39 -04:00
|
|
|
ADD dbclient/ dbclient/
|
2023-09-16 17:08:56 -04:00
|
|
|
ADD dbschema/ dbschema/
|
|
|
|
ADD dbstruct/ dbstruct/
|
2023-09-15 18:16:39 -04:00
|
|
|
ADD webcontent/ webcontent/
|
|
|
|
ADD webhandler/ webhandler/
|
2023-09-17 01:25:06 -04:00
|
|
|
ADD webresponse/ webresponse/
|
2023-09-15 13:14:43 -04:00
|
|
|
|
|
|
|
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"]
|