15 lines
426 B
Docker
15 lines
426 B
Docker
FROM docker.io/library/golang:alpine AS builder
|
|
RUN apk update \
|
|
&& apk add --no-cache git \
|
|
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo
|
|
|
|
WORKDIR $GOPATH/src/www-jmbit-de
|
|
COPY . .
|
|
RUN go get -d -v
|
|
RUN cd hugo && hugo
|
|
RUN go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/www
|
|
|
|
FROM scratch
|
|
COPY --from=builder /go/bin/www /go/bin/www
|
|
ENTRYPOINT ["/go/bin/www"]
|