Skip to content

Commit

Permalink
[docker-ptf]: Update entrypoint entry for docker-ptf (#836)
Browse files Browse the repository at this point in the history
* Updated entrypoint for docker-ptf container

* Add main supervisord.conf file under /etc/supervisor. Run supervisord with option -c
pavel-shirshov authored Jul 24, 2017

Verified

This commit was signed with the committer’s verified signature.
sandhose Quentin Gliech
1 parent 40f1e53 commit d898011
Showing 5 changed files with 34 additions and 3 deletions.
7 changes: 5 additions & 2 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -96,8 +96,11 @@ RUN mkdir /var/run/sshd \
&& sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config \
&& sed -i '$aUseDNS no' /etc/ssh/sshd_config

COPY ["supervisord.conf", "sshd.conf", "ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
COPY ["supervisord.conf", "/etc/supervisor/"]
COPY ["conf.d/supervisord.conf", "conf.d/sshd.conf", "conf.d/ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

RUN mkdir -p /var/log/supervisor

EXPOSE 22

ENTRYPOINT ["/usr/bin/supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions dockers/docker-ptf/conf.d/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[supervisord]
nodaemon=true
28 changes: 27 additions & 1 deletion dockers/docker-ptf/supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)

[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

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

; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf

0 comments on commit d898011

Please sign in to comment.