forked from jojomi/docker-hugo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 1.11 KB
/
Dockerfile
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
# 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.7@sha256:7df6db5aa61ae9480f52f0b3a06a140ab98d427f86d8d5de0bedab9b8df6b1c0
LABEL description="Docker container for building static sites with the Hugo static site generator."
LABEL maintainer="Johannes Mitlmeier <[email protected]>"
COPY ./run.sh /run.sh
ENV HUGO_VERSION=0.40.3
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp
RUN tar -xf /tmp/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /tmp \
&& mkdir -p /usr/local/sbin \
&& mv /tmp/hugo /usr/local/sbin/hugo \
&& rm -rf /tmp/hugo_${HUGO_VERSION}_linux_amd64 \
&& rm -rf /tmp/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz \
&& rm -rf /tmp/LICENSE.md \
&& rm -rf /tmp/README.md
RUN apk add --update git \
&& apk upgrade \
&& apk add --no-cache ca-certificates
VOLUME /src
VOLUME /output
RUN chmod 0777 /run.sh && ls -lahr / && whoami && cat /run.sh && which sh
WORKDIR /src
CMD ["/run.sh"]
EXPOSE 1313