hugo-action/Containerfile

27 lines
533 B
Docker

FROM docker.io/golang:1.21-alpine3.19 AS builder
RUN apk --no-cache add \
git
ADD md2gmi.go /md2gmi.go
RUN go build -o /md2gmi /md2gmi.go
ENV HUGO_VERSION=v0.121.1
RUN git clone https://github.com/gohugoio/hugo.git /src/hugo
WORKDIR /src/hugo
RUN git checkout $HUGO_VERSION
RUN go build -o /hugo
FROM docker.io/alpine:3.19
COPY --from=builder /md2gmi /bin/md2gmi
COPY --from=builder /hugo /bin/hugo
RUN apk --no-cache add \
make
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]