forked from google/docsy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
53 lines (41 loc) · 1.48 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
43
44
45
46
47
48
49
50
51
52
FROM public.ecr.aws/docker/library/ubuntu:22.04
LABEL maintainer="OA IT-Support <itsupport@openanalytics.eu>"
ENV HUGO_VERSION 0.104.3
ENV AUTOPREFIXER_VERSION 10.4.13
ENV POSTCSSCLI_VERSION 10.1.0
ENV POSTCSS_VERSION 8.4.21
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-utils \
ca-certificates \
apt-transport-https \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
# install recent LTS version of node, see https://nodejs.org/en/about/releases/
RUN wget -qO- https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get update \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# extended version for docsy theme
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb /tmp
RUN dpkg -i /tmp/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
RUN npm install -g postcss@${POSTCSS_VERSION}
RUN npm install -g postcss-cli@${POSTCSSCLI_VERSION}
RUN npm install -g @fortawesome/fontawesome-free@6.2.0
RUN npm install -g bootstrap@4.6.2
RUN mkdir -p /etc/hugo/themes
COPY . /etc/hugo/themes/docsy
WORKDIR /etc/hugo/themes/docsy
RUN npm install autoprefixer@${AUTOPREFIXER_VERSION}
RUN npm install
RUN useradd hugo -u 1000 \
&& mkdir /home/hugo \
&& chown hugo:hugo /home/hugo \
&& addgroup hugo staff \
&& adduser hugo sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER hugo
WORKDIR /src
EXPOSE 1313