The following is advanced information. You don’t need to understand or
leverage this information to use Enclave, but it might be relevant if
you want to precisely control the behavior of your Containers.

PID 1 is the process that receives signals when your Container is signalled
(e.g. PID receives SIGTERM when your Container needs to shutdown during a
deployment).

Since a shell is used as the command in your Containers to interpret your
Procfile, this means PID 1 will be a shell.

Shells don’t typically forward signals, which means that when your Containers
receive SIGTERM, they’ll do nothing if a shell is running as PID 1. As a
result, running a shell there may not be desirable.

If you’d like to get the shell out of the equation when running your
Containers, you can use the exec call, like so:

If your image has an ENTRYPOINT, Enclave will not use a shell to interpret
your Procfile. Instead, your Procfile line is split according to shell rules,
then simply passed to your Container’s ENTRYPOINT as a series of
arguments.

For example, if your Procfile looks like this:

web:run "$ENVIRONMENT"

Then, your ENVIRONMENT will receive the literal strings run and
$ENVIRONMENT as arguments (i.e. the value for $ENVIRONMENT will
not be interpolated).

This means your Procfile doesn’t need to reference commands that exist in your
Container: it only means to reference commands that make sense to your
ENTRYPOINT.

However, it also means that you can’t interpolate variables in your Procfile
line. If you do need shell processing for interpolation with an
ENTRYPOINT, here are two options: