Skip to content

Commit 2ee5ee8

Browse files
Update Replica set
1 parent 0d9e545 commit 2ee5ee8

File tree

3 files changed

+23
-27
lines changed

3 files changed

+23
-27
lines changed

rhel-mongodb-repl/Dockerfile

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
FROM 10.64.27.125:5000/rhel:7-0.0.1.beta.el7
2-
# FROM 10.64.27.125:5000/vpavlin/rhel7
1+
FROM rhel7
32
MAINTAINER scollier <[email protected]>
43

5-
# Update the system
6-
RUN yum -y update; yum clean all
7-
84
# Add repo files
95
ADD ./mongo.repo /etc/yum.repos.d/
10-
# ADD ./mongodb.conf /etc/
11-
ADD ./mongod.conf /etc/
126

13-
# Install MongoDB and extras
14-
RUN yum -y install mongo-10gen-server mongo-10gen; yum clean all
15-
RUN yum -y install procps-ng iptables; yum clean all
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
1618

17-
# Expose ports
18-
EXPOSE 27017 28017
19+
VOLUME ["/var/lib/mongodb"]
20+
USER mongod
1921

20-
# USER mongod
22+
ADD mongodb.conf /etc/mongodb.conf
2123

22-
CMD ["/usr/bin/mongod", "-f", "/etc/mongod.conf"]
24+
EXPOSE 27017
25+
CMD ["/usr/bin/mongod", "--config", "/etc/mongodb.conf", "--replSet", "replica0"]

rhel-mongodb-repl/mongod.conf

-13
This file was deleted.

rhel-mongodb-repl/mongodb.conf

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
##
2+
### Basic Defaults
3+
##
4+
dbpath = /var/lib/mongo
5+
smallfiles = true
6+
nohttpinterface = true

0 commit comments

Comments
 (0)