forked from jojomi/docker-hugo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
33 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use Alpine Linux as our base image so that we minimize the overall size our final container, and minimize the surface area of packages that could be out of date.
FROM alpine:3.22.1
LABEL description="Docker container for building static sites with the Hugo static site generator."
LABEL maintainer="OpenSVC <admin@opensvc.com>"
LABEL author="Johannes Mitlmeier <dev.jojomi@yahoo.com>"
# config
ENV HUGO_VERSION=0.150.0
#ENV HUGO_TYPE=
ENV HUGO_TYPE=_extended
COPY ./run.sh /run.sh
ENV HUGO_ID=hugo${HUGO_TYPE}_${HUGO_VERSION}
RUN wget -O - https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_ID}_Linux-64bit.tar.gz | tar -xz -C /tmp \
&& mkdir -p /usr/local/sbin \
&& mv /tmp/hugo /usr/local/sbin/hugo \
&& rm -rf /tmp/${HUGO_ID}_linux_amd64 \
&& rm -rf /tmp/LICENSE.md \
&& rm -rf /tmp/README.md
RUN apk add --update git asciidoctor libc6-compat libstdc++ \
&& apk upgrade \
&& apk add --no-cache ca-certificates go \
&& chmod 0755 /run.sh
VOLUME /src
VOLUME /output
WORKDIR /src
CMD ["/run.sh"]
EXPOSE 1313