-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
30 lines (24 loc) · 899 Bytes
/
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
##
# NodeJS MongoDB Redis
#
# This creates an image which contains an environment for NodeJS app ecosystem
# - Node.js 0.10.23
# - MongoDB 2.4.8
# - Redis 2.4.15
##
FROM truongsinh/nodejs
MAINTAINER TruongSinh Tran-Nguyen <[email protected]>
# Fix upstart under a virtual host https://github.com/dotcloud/docker/issues/1024
RUN dpkg-divert --local --rename --add /sbin/initctl \
&& ln -s /bin/true /sbin/initctl
# Configure Package Management System (APT) & install MongoDB
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 \
&& echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list \
&& apt-get update \
&& apt-get install -y mongodb-10gen
# Redis server
RUN apt-get install -y redis-server
# Start MongoDB
CMD mongod --fork -f /etc/mongodb.conf \
&& redis-server /etc/redis/redis.conf \
&& bash