Supervisor to manage multiple processes in a container. Use Supervisor to better control, manage, and restart the processes we want to run. Supervisor is a Process control system . it is a C/S system , It allows the user to monitor and control the class UNIX process of the system
configuration first creates a Dockerfile
Create a directory of Dockerfile
generate the key and create the Authorized_keys file.
Supervisor Configuration
The first paragraph supervsord configures the software itself and runs using the nodaemon parameter. nodaemon=true if it is
True, thesupervisord process will run in the foreground , default to false, That is, the daemon runs in the daemons.
/docker/apache directory Content list
Create image
start our Supervisor container .
verify SSH [email protected] -p port number No secrets
testing : Accessing the Web and ssh services provided by the container
2.Docker Compose Project
the compose project originates from the previous Fig project and is written in python code. the compose project is primarily used to orchestrate the deployment of Docker -based applications.
installation Docker-compose
install pip first #wget https://bootstrap.pypa.io/get-pip.py
re-install compose
View The version of Docker-compose and the use of commands.
we create a classic Web Project: A Haproxythat mounts three web containers
The Docker-haproxy directory, which is the Project working directory, in which you create two subdirectories: haproxy and Web.
#mkdir-P/root/docker-haproxy/{haproxy,web}
Create a docker-compose.yml file under the /root/docker-haproxy/ directory
Create the haproxy Master profile in the/root/docker-haproxy/haproxy directory haproxy.cfg
storing Web Site page Files in the /root/docker-haproxy/web directory
Docker-compose.yml File
Haproxy master configuration file haproxy.cfg
Cfg
Web Site Web page
Haproxy directory :
in which a haproxy.cfg file is generated
Docker-compose.yml
Write The docker-compose.yml file, which is the main template file used by compose. The content is very simple and means
set 3 Web containers, and 1 haproxy containers.
To run the Compose project :
Execute docker-compose up-d in the Docker-haproxy directory to launch your app
To view container startup conditions
Open the browser native to this machine I
Docker uses supervisor to process management