-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (38 loc) · 1.54 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
ARG MONGO_VERSION=latest
FROM mongo:${MONGO_VERSION}
# ================================================================================================
# Inspiration: Docker Framework (https://github.com/zeroc0d3/docker-framework)
# Dwi Fahni Denni <[email protected]>
# ================================================================================================
# Core Contributors:
# - Mahmoud Zalt @mahmoudz
# - Bo-Yi Wu @appleboy
# - Philippe Trépanier @philtrep
# - Mike Erickson @mikeerickson
# - Dwi Fahni Denni @zeroc0d3
# - Thor Erik @thorerik
# - Winfried van Loon @winfried-van-loon
# - TJ Miller @sixlive
# - Yu-Lung Shao (Allen) @bestlong
# - Milan Urukalo @urukalo
# - Vince Chu @vwchu
# - Huadong Zuo @zuohuadong
# ================================================================================================
MAINTAINER "Laradock Team <[email protected]>"
ENV MONGO_INITDB_ROOT_PASSWORD="password" \
MONGO_INITDB_ROOT_USERNAME="root" \
MONGO_INITDB_ROOT_HOST="localhost" \
MONGO_DATABASE="laradock_mongodb" \
MONGO_USER="laradock" \
MONGO_PASSWORD="password"
RUN mkdir -p /data/db \
&& mkdir -p /data/configdb \
&& mkdir -p /data/mongodb \
&& chown -R mongodb:mongodb /data/db /data/configdb
VOLUME /data/db /data/configdb /data/mongodb
COPY ./config/mongodb/mongod.conf /etc/mongod.conf
COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod 777 /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 27017
CMD [ "mongod" ]