Lint, document, create and remove your projects s6-overlay files and services.
6.2K
This cli tool can be used to help you setup your projects s6-overlay files and directories. It can also be used to create, remove and lint services.
s6-overlay is an easy-to-install (just extract a tarball or two!) set of scripts and utilities allowing you to use existing Docker images while using s6 as a pid 1 for your container and process supervisor for your services. To know more about s6-overlay visit github.com/just-containers/s6-overlay.
If you want to use the cli in a Dockerfile you can copy it from the docker image
COPY --from=hakindazz/s6-cli:v0.1.0 /app/s6-cli /usr/local/bin/s6-cli
Mount the s6-overlay path to the container and run commands on it
docker run -v {your-project-path}/docker/app/root/etc/s6-overlay:/app/s6-overlay -w /app hakindazz/s6-cli:v0.1.0 /app/s6-cli -p /app/s6-overlay/s6-rc.d lint
There is a help command that you can use to get more info about the commands in the cli. Run it with
./s6-cli help
--rootPath {path}, -p {path}All commands need the rootPath to be specified. It must point to the directory where services will be defined.
Default is set to /etc/s6-overlay/s6-rc.d
There are three types of services that can be created: Oneshot, Longrun and Bundle. Read more about them here
./s6-cli --rootPath {path} create {o|l|b} {service}
If the service is not needed anymore it can be removed with the following command.
./s6-cli remove {service}
./s6-cli lint
This command will generate a mermaid graph of the services.
./s6-cli mermaid > mermaid.md
Or pipe it directly to a markdown file
./s6-cli mermaid > mermaid.md
The output will look something like this:
```mermaid
graph TD;
user --> prepare-directory
user --> nginx
nginx --> php-fpm
php-fpm --> create-directories
Content type
Image
Digest
sha256:e04db6144…
Size
2.5 MB
Last updated
almost 3 years ago
docker pull hakindazz/s6-cli