hugo-action/Containerfile

27 lines
533 B
Plaintext
Raw Permalink Normal View History

2023-12-31 11:23:51 +00:00
FROM docker.io/golang:1.21-alpine3.19 AS builder
2023-12-31 12:24:02 +00:00
RUN apk --no-cache add \
git
2023-12-31 11:23:51 +00:00
ADD md2gmi.go /md2gmi.go
RUN go build -o /md2gmi /md2gmi.go
2023-12-31 12:24:02 +00:00
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
2023-12-31 11:23:51 +00:00
2023-12-31 12:24:02 +00:00
COPY --from=builder /md2gmi /bin/md2gmi
COPY --from=builder /hugo /bin/hugo
2023-12-31 11:23:51 +00:00
2023-12-31 12:24:02 +00:00
RUN apk --no-cache add \
make
2023-12-31 11:23:51 +00:00
2023-12-31 12:24:02 +00:00
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]