Tuesday, 5 August 2025

s6 overlay in docker, /init, sevices.d

 S6 overlay changes 1 process 1 container to multiple process 1 container in docker:

set up guide:

https://medium.com/@yashpateld22d/how-to-run-multiple-services-in-docker-using-s6-overlay-wazuh-logging-kubernetes-ready-setup-3a5652b3b698


use case example

/etc/services.d/ ├── webapp/ │ └── run ├── redis/ │ └── run └── cron/ └── run


In Alpine Docker containers using s6-overlay,

scripts within /etc/services.d/<service-name>/run

are executed when the container starts and

the s6-overlay process manager initializes and starts the defined services.


https://github.com/just-containers/s6-overlay?tab=readme-ov-file#usage

S6 initilization requires to have ENTRYPOINT["/init"] in DockerFile

Sets /init as the entrypoint to enable s6 supervision




No comments:

Post a Comment