summaryrefslogtreecommitdiffstats
path: root/Services/nodejs/Dockerfile
blob: 8dee3c397b413ce20a4cc625c5b5e7ff8561118b (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 8000
VOLUME [$DATA_PATH,$LOG_PATH]
CMD ["/bin/run.sh"]