-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (35 loc) · 1.01 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
31
32
33
34
35
36
37
38
39
40
41
42
## Base image
## -------------------------------------------------------------------
FROM debian:bullseye-slim
ENV VERSION='0.58.3'
ENV CHECKSUM="hugo_${VERSION}_checksums.txt"
ENV NAME="hugo_extended_${VERSION}_Linux-64bit.tar.gz"
ENV BASE_URL="https://github.com/gohugoio/hugo/releases/download"
ENV URL="${BASE_URL}/v${VERSION}/${NAME}"
ENV CHECKSUM_URL="${BASE_URL}/v${VERSION}/${CHECKSUM}"
## Set working directory.
WORKDIR /hugo
## Install:
## - git
## - ssh
## - wget
## - ca-certificatess
RUN apt-get update \
&& apt-get install --no-install-recommends -qq \
git \
wget \
openssh-server \
ca-certificates \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
## Install hugo.
RUN wget --quiet "${URL}" && wget --quiet "${CHECKSUM_URL}" \
&& grep "${NAME}" "./${CHECKSUM}" | sha256sum -c - \
&& tar -zxvf "${NAME}" \
&& mv ./hugo /usr/bin/hugo \
&& rm -rf /hugo
## Set working directory.
WORKDIR /src
## Set starting directory.
ENTRYPOINT [ "/usr/bin/hugo" ]