V
V
Vadim2021-01-14 00:33:19
Docker
Vadim, 2021-01-14 00:33:19

How to run two processes in docker container?

Hello everyone,

are there any rules when writing a Dockerfile so that you can run cron (as root, in background) and clamd antivirus as clamav user?

base image:
https://github.com/UKHomeOffice/docker-clamav/blob...

all the best,
Vadim

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan, 2021-01-14
@Tiasar

Specify in the Dockerfile that you need to install the supervisor, write your config for it, run as many services as you like through it. In general, the docker philosophy is 1 container - 1 process. The container lives while the process lives. When starting a container, only 1 process can be started.
Those. supervicor will be the process that keeps the container from finishing. And all other processes are controlled by the supervisor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question