forked from feedhenry/fh-mbaas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
37 lines (27 loc) · 993 Bytes
/
Dockerfile.dev
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
FROM centos/nodejs-6-centos7:latest
EXPOSE 8080
#debug port
EXPOSE 5858
USER root
# Extract app to work dir and copy conf
COPY . ./
RUN mkdir -p /var/feedhenry/data && \
mkdir -p /var/feedhenry/upload && \
chmod -R 755 /var/feedhenry && \
ln -sf /usr/share/zoneinfo/UTC /etc/localtime && \
mkdir -p config && \
chown -R default:root ./
# Installing fonts to be able to render PDFs for submissions
RUN yum install -y dejavu-sans-fonts && \
yum install -y http://cbs.centos.org/kojifiles/packages/phantomjs/1.9.7/3.el7/x86_64/phantomjs-1.9.7-3.el7.x86_64.rpm
USER default
RUN scl enable rh-nodejs4 "npm install -g nodemon" && \
scl enable rh-nodejs4 "npm install --production" && \
mv conf-docker.json config/conf.json && \
chmod -R ug+rw ./
USER root
RUN mkdir -p /root/licenses/rhmap/ && \
cp licenses/* /root/licenses/rhmap/
USER default
ENV FHDEV true
CMD ["bash", "-c", "nodemon --debug=5858 fh-mbaas.js config/conf.json --master-only"]