Mettre à jour processus docker pour le projet #1
1 changed files with 19 additions and 4 deletions
23
Dockerfile
23
Dockerfile
|
@ -7,9 +7,24 @@ LABEL repo="https://git.agecem.com/agecem/babillard"
|
|||
|
||||
WORKDIR /go/src/app
|
||||
|
||||
COPY . .
|
||||
COPY go.mod go.sum main.go ./
|
||||
|
||||
RUN go get -d -v . && \
|
||||
go install -v .
|
||||
ADD cmd/ cmd/
|
||||
|
||||
CMD babillard
|
||||
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o babillard .
|
||||
|
||||
# Alpine
|
||||
|
||||
FROM alpine:3.17.2
|
||||
|
||||
RUN apk update && apk upgrade --no-cache
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ADD contenu/ contenu/
|
||||
|
||||
ADD static/ static/
|
||||
|
||||
COPY --from=build /go/src/app/babillard /usr/bin/babillard
|
||||
|
||||
CMD ["babillard", "server"]
|
||||
|
|
Loading…
Reference in a new issue