Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45888

Image.inside and Agent should use --init with 'docker run'

    XMLWordPrintable

Details

    Description

      When Image.Inside() or an "agent { docker ... }" is used to docker run ... cat a docker container, it should always use the --init flag.

      --init  Run an init inside the container that forwards signals and reaps processes

      This creates a PID 1 --init process that is sometimes needed to properly shutdown a container with multiple processes inside it.

      A lot of build containers can start up a bunch of processes that may not be properly reaped or may not properly receive TERM and QUIT signals when trying to shutdown a container.

      This should fix problems like JENKINS-37769 and JENKINS-32859

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            What is this flag? Not present in Docker 1.12.6 AFAICT.

            jglick Jesse Glick added a comment - What is this flag? Not present in Docker 1.12.6 AFAICT.

            It runs a built-into-docker init process as PID 1.

            The documentation from ‘docker run --help‘ is above.

            I'm not sure when it added. Probably around when things got renumbered.

            https://stackoverflow.com/questions/43122080/how-to-use-init-parameter-in-docker-run

            docwhat Christian Höltje added a comment - It runs a built-into-docker init process as PID 1. The documentation from ‘docker run --help‘ is above. I'm not sure when it added. Probably around when things got renumbered. https://stackoverflow.com/questions/43122080/how-to-use-init-parameter-in-docker-run

            The --init flag was added in the Docker 1.13.0 release

            benjdewan benjamin dewan added a comment - The --init flag was added in the Docker 1.13.0 release

            People

              Unassigned Unassigned
              docwhat Christian Höltje
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: