-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.kei
45 lines (35 loc) · 994 Bytes
/
Dockerfile.kei
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
FROM ubuntu:bionic AS base
ENV BRANCH "local"
RUN apt-get update && \
apt-get install -y \
ca-certificates \
nodejs \
npm \
python-pip \
wget && \
update-ca-certificates
# Hugo
ENV HUGO_VERSION=0.69.2
RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz -O hugo.tar.gz && \
tar -xzf hugo.tar.gz && \
rm hugo.tar.gz && \
mv hugo /usr/bin && \
chmod 755 /usr/bin/hugo
# awscli
RUN pip install awscli
# node + yarn
ENV VERSION=v11.11.0 NPM_VERSION=6 YARN_VERSION=latest
ENV NODE_VERSION 11.11.0
RUN npm i -g n && \
n ${NODE_VERSION}
RUN npm install -g yarn
# Website source
RUN mkdir -p /src
WORKDIR /src
COPY package.json yarn.lock /src/
RUN yarn install
COPY . /src/
RUN hugo --environment production
# Copy build files into /engineering-education directory.
FROM nginx
COPY --from=base /src/public /usr/share/nginx/html/engineering-education/