Victor Lacasse-Beaudoin
1022dd05db
Déplacer embed/ vers public/ Ajouter public/js et public/scss Ajouter templating pour public/html/*.gohtml Ajouter --build à procédure dans README.md Déplacer contenu de index.html vers template `index-html` Ajouter middleware RemoveTrailingSlash Déplacer anonymous function de route `/` vers handler `handleIndex`
23 lines
359 B
Docker
23 lines
359 B
Docker
FROM golang:1.19.1 as build
|
|
|
|
LABEL author="vlbeaudoin"
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum main.go server.go ./
|
|
|
|
ADD public/ public/
|
|
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
|
|
|
|
# Alpine
|
|
|
|
FROM alpine:3.17.1
|
|
|
|
RUN apk update && apk add file --no-cache && apk upgrade --no-cache
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /go/src/app ./
|
|
|
|
CMD ["./app"]
|