bottin-ag/Dockerfile

33 lines
606 B
Text
Raw Normal View History

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 ./
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/
ADD dbclient/ dbclient/
ADD dbschema/ dbschema/
ADD dbstruct/ dbstruct/
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"]