summaryrefslogtreecommitdiffstats
path: root/Services/nodejs/Dockerfile
blob: 74fec1460f46c13f47d8aa6b68cfd7de734a78da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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  \
    APP_PATH=/data \
    TMP_APP_PATH=/tmp/nodejs \
    APP_MAIN=/data/app.js
COPY *.sh /bin/
RUN chmod 775 /bin/run.sh && \
    mkdir -p $APP_PATH && \
    mkdir -p $LOG_PATH && \
    touch $STARTUPLOG
COPY *.json $TMP_APP_PATH/
COPY *.js $TMP_APP_PATH/
RUN cd $TMP_APP_PATH && npm install -production

EXPOSE 8000
VOLUME [$APP_PATH,$LOG_PATH]
CMD ["/bin/run.sh"]