babillard/Dockerfile
Victor Lacasse-Beaudoin b4669a9551 fix: dockerfile ne copie pas les go source files de la racine
Ajouter *.go à build step copy

Ajouter LICENSE à build step copy

Retirer pkg/ de build step add

Retirer apk upgrade de run step - plus prévisible si on utilise direct
ce que les image distributors ont packagés
2025-03-27 17:46:24 -04:00

27 lines
528 B
Docker

from golang:1.23 as build
label author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
label license="MIT"
label licensee="AGECEM"
label repo="https://git.agecem.com/agecem/babillard"
workdir /go/src/app
copy go.mod go.sum LICENSE cmd.go config.go contenu.go data.go handlers.go response.go ./
add cmd/ cmd/
add ui/ ui/
run CGO_ENABLED=0 go build -a ./cmd/babillard/
# Alpine
from alpine:3.21
workdir /app
add contenu/ contenu/
copy --from=build /go/src/app/babillard /usr/bin/babillard
cmd ["babillard", "server"]