summaryrefslogtreecommitdiffstats
path: root/Services/nodejs/Dockerfile
blob: c62807ee37524f7984cd104e3d5b7bc76b327a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM startx/fedora
MAINTAINER Christophe LARUE <dev@startx.fr>

USER root
RUN dnf -y install nodejs npm python make gcc && \
    dnf clean all 
ENV STARTUPLOG=/logs/startup.log \
    LOG_PATH=/logs  \
    DATA_PATH=/data \
    APP_PATH=/app \
    APP_MAIN=/app/app.js
COPY *.sh /bin/
RUN chmod 775 /bin/run.sh && \
    mkdir -p $APP_PATH && \
    mkdir -p $DATA_PATH && \
    mkdir -p $LOG_PATH && \
    touch $STARTUPLOG
COPY *.js $APP_PATH/
COPY *.json $APP_PATH/
RUN cd $APP_PATH && npm install -production

EXPOSE 8080
VOLUME $DATA_PATH
CMD [ "/bin/run.sh" ]