forked from CSCfi/csc-user-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (28 loc) · 1011 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
32
33
34
35
36
37
38
39
40
41
FROM centos:8
LABEL maintainer="CSC Service Desk <[email protected]>"
# These need to be owned and writable by the root group in OpenShift
ENV ROOT_GROUP_DIRS='/var/run /var/log/nginx /var/lib/nginx'
ARG repo_branch=master
RUN yum -y install epel-release &&\
yum -y install nginx &&\
yum -y install python3 &&\
yum -y install python3-pip &&\
yum -y install git &&\
yum clean all
RUN chgrp -R root ${ROOT_GROUP_DIRS} &&\
chmod -R g+rwx ${ROOT_GROUP_DIRS}
COPY . /tmp
WORKDIR /tmp
RUN git clone --no-checkout https://github.com/CSCfi/csc-user-guide git_folder && \
mv git_folder/.git . && \
rm -r git_folder && \
git reset HEAD --hard && \
git checkout -f $repo_branch
RUN pip3 install --no-cache-dir -r requirements.txt && \
bash scripts/generate_stamps.sh && \
bash scripts/generate_alpha.sh && \
bash scripts/generate_by_system.sh && \
mkdocs build -d /usr/share/nginx/html
COPY nginx.conf /etc/nginx
EXPOSE 8000
CMD [ "/usr/sbin/nginx" ]