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

USER root
RUN dnf -y install mongodb mongodb-server rsyslog-mongodb  && \
    dnf clean all 
ENV STARTUPLOG=/logs/startup.log \
    LOG_PATH=/logs  \
    DATA_PATH=/data
COPY *.sh /bin/
RUN chmod 775 /bin/run.sh && \
    mkdir -p $DATA_PATH && \
    mkdir -p $LOG_PATH && \
    touch $STARTUPLOG
RUN chown -R mongodb:mongodb $DATA_PATH $LOG_PATH

EXPOSE 27017 28017
VOLUME [ $DATA_PATH , $LOG_PATH ]
CMD [ "/bin/run.sh" ]