Start a process with CMD

49 views
Skip to first unread message

AJ NOURI

unread,
Aug 6, 2017, 8:59:06 AM8/6/17
to passenger-docker
Hi,
I would like to start a container with a process installed during image build (not as argument to docker run ...).

But I am wondering, how I could start the container with my_init to manage processes and then "myprocess" if I do as follow:

---------------
FROM phusion/baseimage:0.9.22

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

# Tell debconf to run in non-interactive mode
ENV DEBIAN_FRONTEND noninteractive

# Installation of myprocess
...

CMD ["myprocess"]

-----------------

AJ NOURI

unread,
Aug 6, 2017, 9:05:40 AM8/6/17
to passenger-docker
In the previous example, only the last CMD "myprocess" will run, not "/sbin/my_init" , that's not what I want.

I would like the container to run with "/sbin/my_init" first and then be able to run another process or even more processes (in the background)
Reply all
Reply to author
Forward
0 new messages