-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (22 loc) · 904 Bytes
/
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
31
FROM alpine:edge
RUN apk --no-cache add tini git openssh-client \
&& apk --no-cache add --virtual devs tar curl
# Install Caddy Server and some middleware
RUN curl "https://caddyserver.com/download/build?os=linux&arch=amd64&features=git%2Cprometheus%2Crealip" \
| tar --no-same-owner -C /usr/bin/ -xz caddy
RUN curl -L "https://github.com/spf13/hugo/releases/download/v0.19/hugo_0.19_Linux-64bit.tar.gz" | tar -vxzf - -C /tmp/ && mv /tmp/hugo*/hugo* /usr/bin/hugo && rm -rf /tmp/hugo*
# Remove build devs
#RUN apk del devs
ADD ./config.yaml /app/config.yaml
ADD ./archetypes /app/archetypes
ADD ./content /app/content
ADD ./i18n /app/i18n
ADD ./data /app/data
ADD ./layouts /app/layouts
ADD ./public /app/public
ADD ./static /app/static
ADD ./themes /app/themes
ADD ./Caddyfile /etc/Caddyfile
RUN cd /app; /usr/bin/hugo
ENTRYPOINT ["/sbin/tini"]
CMD ["caddy", "--conf", "/etc/Caddyfile"]