Skip to content

Commit c906814

Browse files
committed
Add the centos-mongodb example
1 parent c3d81da commit c906814

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

centos-mongodb/Dockerfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM centos
2+
MAINTAINER Jessica Forrester <[email protected]>
3+
4+
# Add repo files
5+
ADD ./mongo.repo /etc/yum.repos.d/
6+
7+
# Install MongoDB packages and extras
8+
RUN yum --assumeyes update && \
9+
yum --assumeyes install \
10+
mongo-10gen-server \
11+
mongo-10gen \
12+
procps-ng \
13+
iptables && \
14+
yum clean all && \
15+
mkdir -p /var/lib/mongodb && \
16+
touch /var/lib/mongodb/.keep && \
17+
chown -R mongod:mongod /var/lib/mongodb
18+
19+
VOLUME ["/var/lib/mongodb"]
20+
USER mongod
21+
22+
ADD mongodb.conf /etc/mongodb.conf
23+
24+
EXPOSE 27017
25+
CMD ["/usr/bin/mongod", "--config", "/etc/mongodb.conf"]

centos-mongodb/mongo.repo

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[mongodb]
2+
name=MongoDB Repository
3+
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
4+
gpgcheck=0
5+
enabled=1

centos-mongodb/mongodb.conf

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# mongodb.conf
2+
3+
# Where to store the data.
4+
5+
# Note: if you run mongodb as a non-root user (recommended) you may
6+
# need to create and set permissions for this directory manually,
7+
# e.g., if the parent directory isn't mutable by the mongodb user.
8+
dbpath=/var/lib/mongodb
9+
10+
#where to log
11+
#logpath=/var/log/mongodb/mongodb.log
12+
13+
#logappend=true
14+
15+
#port = 27017
16+
17+
# Disables write-ahead journaling
18+
# nojournal = true
19+
20+
# Enables periodic logging of CPU utilization and I/O wait
21+
#cpu = true
22+
23+
# Turn on/off security. Off is currently the default
24+
#noauth = true
25+
#auth = true
26+
27+
# Verbose logging output.
28+
#verbose = true
29+
30+
# Inspect all client data for validity on receipt (useful for
31+
# developing drivers)
32+
#objcheck = true
33+
34+
# Enable db quota management
35+
#quota = true
36+
37+
# Set oplogging level where n is
38+
# 0=off (default)
39+
# 1=W
40+
# 2=R
41+
# 3=both
42+
# 7=W+some reads
43+
#diaglog = 0
44+
45+
# Ignore query hints
46+
#nohints = true
47+
48+
# Disable the HTTP interface (Defaults to localhost:28017).
49+
nohttpinterface = true
50+
51+
# Turns off server-side scripting. This will result in greatly limited
52+
# functionality
53+
#noscripting = true
54+
55+
# Turns off table scans. Any query that would do a table scan fails.
56+
#notablescan = true
57+
58+
# Disable data file preallocation.
59+
noprealloc = true
60+
smallfiles = true
61+
62+
# Specify .ns file size for new databases.
63+
# nssize = <size>
64+
65+
# Accout token for Mongo monitoring server.
66+
#mms-token = <token>
67+
68+
# Server name for Mongo monitoring server.
69+
#mms-name = <server-name>
70+
71+
# Ping interval for Mongo monitoring server.
72+
#mms-interval = <seconds>
73+
74+
# Replication Options
75+
76+
# in master/slave replicated mongo databases, specify here whether
77+
# this is a slave or master
78+
#slave = true
79+
#source = master.example.com
80+
# Slave only: specify a single database to replicate
81+
#only = master.example.com
82+
# or
83+
#master = true
84+
#source = slave.example.com
85+
86+
# in replica set configuration, specify the name of the replica set
87+
# replSet = setname

0 commit comments

Comments
 (0)