forked from Nortamo/jekylsite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (27 loc) · 983 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
FROM rockylinux: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=dev
RUN yum -y install epel-release &&\
dnf module enable -y nginx:mainline &&\
yum -y install nginx &&\
yum -y install git &&\
yum -y install findutils &&\
yum -y install ruby ruby-devel &&\
dnf -y group install "Development Tools" &&\
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/JMuff22/jekylsite git_folder && \
mv git_folder/.git . && \
rm -r git_folder && \
git reset HEAD --hard && \
git checkout -f $repo_branch
RUN gem install jekyll bundler && gem install minima &&\
jekyll build -d /usr/share/nginx/html
COPY nginx.conf /etc/nginx
EXPOSE 8000
CMD [ "/usr/sbin/nginx" ]