s6-overlay support in container instances

Dommicentl 31 Reputation points
2023-01-05T16:05:23.21+00:00

I have a problem running an image inside container instances which uses the s6-overlay process supervisor. s6-overlay should run as pid 1. However, it seems that container instances is already running a pid 1 process which causes the entrypoint of the image to fail with the error: s6-overlay-suexec: fatal: can only run as pid 1.

Is there any way I can make sure that my process is running as pid 1 inside container instances?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
699 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Eddie Neto 1,226 Reputation points Microsoft Employee
    2023-01-06T09:08:58.263+00:00

    Hi @Dommicentl

    Thanks for reaching Q&A

    Regarding could you please check if you have the following value configured on your deployement/yaml/dockerfile? "init: true"

    If you have this set as true, please remove or set as a "false".

    Hope this helps. Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.


  2. Eddie Neto 1,226 Reputation points Microsoft Employee
    2023-06-15T09:41:36.1533333+00:00

    Hello @Dommicentl @Fraser McLean @Joaquín Vacas Verisimo

    After checking internally, this is a design limitation in ACI. ACI uses shareProcessNamespace so the pid process is /pause. This is used so other system sidecar containers have visibility over the container main process. It is also used for graceful shutdown, so SIGTERM is cascaded to all other processes when pid 1 is killed.

    For now a workaround is to use AKS or APP Services or selecting another image that doesn't have S6 overlay.

    Hope this helps. Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.