Package: encab
Encab: A Simple Process ManagerEncabis a process manager that simplifies running multiple services in a container or from the command line.It's essentially a replacement for complex, hand-written Docker Container Entrypoint scripts,
especially when dockerizing complex legacy applications.Add it as yourDockerfile Entrypoint,
together with the encab configuration fileencab.yml,...ADDencab.yml.ENTRYPOINT["encab"]Define what you want to run in your container inencab.yml,programs:cron:command:cron -fmain:command:httpd-foregroundand encab cares for the rest.
Run it and you'll always know who's logging what...INFO  encab: encab 0.1.1
   INFO  encab: Using configuration file ./encab.yml, source: Default location.
   ERROR main: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
   ERROR main: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
   ERROR main: [Wed Jan 18 09:47:12.417275 2023] [mpm_event:notice] [pid 12:tid 140142563044672] AH00489: Apache/2.4.54 (Unix) configured -- resuming normal operations
   ERROR main: [Wed Jan 18 09:47:12.417830 2023] [core:notice] [pid 12:tid 140142563044672] AH00094: Command line: 'httpd -D FOREGROUND'
   INFO  cron: Hello Wed Jan 18 09:48:01 UTC 2023It shares some similarities withsupervisordwhich I've used before I wrote encab but
supervisord is a process controll system not designed to run in a Container environment.Featuresrun multiple programs in a container at a time with transparent loggingrun programs as different usershandle environment variables in a flexible waysimplify container debuggingload, build, validate environment variablesDocumentationEncab DocumentationInstallationInstall locallyPrerequisitesPythonVersion >= 3.7activated Python virtual environment such asminicondaorvirtualenvpipinstall-UencabRun locallyCreate sample encab fileencab.ymlencab:
      dry_run: false
   programs:
      main:
         sh:
            - echo "Hello Encab!"Run locally:encabThe result will be something like this:INFO  encab: encab 0.1.1
INFO  encab: Using configuration file ./encab.yml, source: Default location.
INFO  main: Hello Encab!
INFO  main: Exited with rc: 0Install in ContainerPrerequisitesDockerfrom your Linux distribution or Docker Desktop.Run in ContainerCreate sample encab fileencab.ymlencab:
      dry_run: false
   programs:
      main:
         sh:
            - echo "Hello Encab!"Add Encab to yourDocker file.FROMpython:3.10.8-slim-bullseye# --------------------------------------------# Install Venv#ENVVIRTUAL_ENV=/opt/encabenvENVPATH="$VIRTUAL_ENV/bin:$PATH"RUNpython3-mvenv$VIRTUAL_ENV&&\pipinstall--upgradepip# --------------------------------------------# Install Encab#RUNpipinstallencab# -------------------------------------------# add configuration file#ADDencab.yml.# -------------------------------------------# set encab as entrypointENTRYPOINT["encab"]Build containerdockerbuild-tencab_minimum.Run containerdockerrunencab_minimumResult:INFO  encab: encab 0.1.1
INFO  encab: Using configuration file ./encab.yml, source: Default location.
INFO  main: Hello world!
INFO  main: Exited with rc: 0Similar Projectssupervisordsupervisord Github