chore: tier 1 freshness: content/config/containers/multi-service_container.md

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-10-26 22:13:27 +02:00
parent 3f1a01cb71
commit 173c7c4596
2 changed files with 14 additions and 15 deletions

View File

@ -1,12 +1,12 @@
---
description: How to run more than one process in a container
description: Learn how to run more than one process in a single container
keywords: docker, supervisor, process management
title: Run multiple services in a container
title: Run multiple processes in a container
aliases:
- /articles/using_supervisord/
- /engine/admin/multi-service_container/
- /engine/admin/using_supervisord/
- /engine/articles/using_supervisord/
- /articles/using_supervisord/
- /engine/admin/multi-service_container/
- /engine/admin/using_supervisord/
- /engine/articles/using_supervisord/
---
A container's main running process is the `ENTRYPOINT` and/or `CMD` at the
@ -34,7 +34,7 @@ this in a few different ways.
## Use a wrapper script
Put all of your commands in a wrapper script, complete with testing and
debugging information. Run the wrapper script as your `CMD`. This is a very
debugging information. Run the wrapper script as your `CMD`. The following is a
naive example. First, the wrapper script:
```bash
@ -66,10 +66,9 @@ CMD ./my_wrapper_script.sh
## Use Bash job controls
If you have one main process that needs to start first and stay running but
you temporarily need to run some other processes (perhaps to interact with
the main process) then you can use bash's job control to facilitate that.
First, the wrapper script:
If you have one main process that needs to start first and stay running but you
temporarily need to run some other processes (perhaps to interact with the main
process) then you can use bash's job control. First, the wrapper script:
```bash
#!/bin/bash
@ -103,8 +102,8 @@ CMD ./my_wrapper_script.sh
## Use a process manager
Use a process manager like `supervisord`. This is a moderately heavy-weight
approach that requires you to package `supervisord` and its configuration in
Use a process manager like `supervisord`. This is more involved than the other
options, as it requires you to bundle `supervisord` and its configuration into
your image (or base your image on one that includes `supervisord`), along with
the different applications it manages. Then you start `supervisord`, which
manages your processes for you.
@ -140,4 +139,4 @@ logfile_maxbytes=0
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
```
```

View File

@ -1652,7 +1652,7 @@ Manuals:
- path: /config/containers/runmetrics/
title: Collect runtime metrics
- path: /config/containers/multi-service_container/
title: Run multiple services in a container
title: Run multiple processes in a container
- path: /config/daemon/prometheus/
title: Collect metrics with Prometheus
- sectiontitle: Daemon configuration