forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
20 lines (16 loc) · 806 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM centos:7
RUN yum -y install \
epel-release \
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm \
https://rpm.nodesource.com/pub_7.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
&& yum -y install postgresql96-server postgresql96-contrib nodejs \
&& yum clean all \
&& mkdir /var/postgres && chown postgres:postgres /var/postgres \
&& su postgres -c "/usr/pgsql-9.6/bin/initdb -D /var/postgres && mkdir /var/postgres/pg_log"
# NOTE: Modify .dockerignore to whitelist files/directories to copy.
COPY . /PrairieLearn/
RUN chmod +x /PrairieLearn/docker/init.sh \
&& mv /PrairieLearn/docker/config.json /PrairieLearn \
&& mkdir /course \
&& cd /PrairieLearn && npm install
CMD /PrairieLearn/docker/init.sh