Skip to content

Commit

Permalink
add supervisord to launch ssh, plovr and http server at container sta…
Browse files Browse the repository at this point in the history
…rtup
  • Loading branch information
htulipe committed Feb 16, 2014
1 parent db887fa commit 0f99649
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,13 @@ RUN apt-get -y --force-yes install openssh-server
RUN mkdir /var/run/sshd
RUN echo "root:root" | chpasswd

#ENTRYPOINT ['/usr/sbin/sshd']
#Install supervisord
RUN pip install supervisor

#Add supervisord.conf file
ADD files/supervisord.conf /etc/supervisord.conf

WORKDIR /workspace

CMD ["supervisord", "-c", "/etc/supervisord.conf","-n"]

33 changes: 33 additions & 0 deletions files/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)


[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket

[program:sshd]
command=/usr/sbin/sshd -D

[program:plovr]
command=./build.py serve

[program:http]
command=python -mSimpleHTTPServer




2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sudo docker run -i -p 127.0.0.1:8000:8000 -p 127.0.0.1:9810:9810 -p 127.0.0.1:2200:22 -v $1:/workspace:rw -t htipule/ol3 /bin/bash
sudo docker run -i -p 127.0.0.1:8000:8000 -p 127.0.0.1:9810:9810 -p 127.0.0.1:2200:22 -v $1:/workspace:rw -t htipule/ol3

0 comments on commit 0f99649

Please sign in to comment.