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

Support for setting shared memory size (--shm-size) for docker slaves

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • docker-plugin
    • docker-plugin 0.16.2

      For our use case we would like to increase the shared memory size of the containers started by the docker-plugin.

      The setting is possible via the command line with the option --shm-size (see  https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources)

      --shm-size=""	Size of /dev/shm. The format is <number><unit>. number must be greater than 0. Unit is optional and can be b (bytes), k (kilobytes), m (megabytes), or g (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses 64m.

      I have created a Pull Request for adding this configuration. See PR: https://github.com/jenkinsci/docker-plugin/pull/497

       

       

       

       

          [JENKINS-45266] Support for setting shared memory size (--shm-size) for docker slaves

          Attila Vangel added a comment -

          When could you please release this fix in a new docker-plugin version?
          It is badly needed to use google-chrome in docker containers for some testing (selenium based testing e.g. with webdriverio or protractor).
          If I see correctly the last release (0.16.2) is almost 1 year old .
          https://github.com/jenkinsci/docker-plugin/releases
          https://wiki.jenkins.io/display/JENKINS/Docker+Plugin

           

          Attila Vangel added a comment - When could you please release this fix in a new docker-plugin version? It is badly needed to use google-chrome in docker containers for some testing (selenium based testing e.g. with webdriverio or protractor). If I see correctly the last release (0.16.2) is almost 1 year old . https://github.com/jenkinsci/docker-plugin/releases https://wiki.jenkins.io/display/JENKINS/Docker+Plugin  

          Paul Barton added a comment -

          laenzlinger I noticed they just fixed master, if you have time to update you branch so https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fdocker-plugin/activity?branch=PR-497 can pass, maybe they can move this along. This would be helpful as I am having issues with google chrome as well in my container, whereby the solution to solve my issue is increasing the default shm-size according to what I have read.

          Paul Barton added a comment - laenzlinger I noticed they just fixed master, if you have time to update you branch so https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fdocker-plugin/activity?branch=PR-497  can pass, maybe they can move this along. This would be helpful as I am having issues with google chrome as well in my container, whereby the solution to solve my issue is increasing the default shm-size according to what I have read.

          I update the PR-497, see my PR: https://github.com/jenkinsci/docker-plugin/pull/643

          Regards

          Vincent Bailleau added a comment - I update the PR-497, see my PR: https://github.com/jenkinsci/docker-plugin/pull/643 Regards

          Code changed in jenkins
          User: Vincent Bailleau
          Path:
          src/main/java/com/nirima/jenkins/plugins/docker/DockerSimpleTemplate.java
          src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplate.java
          src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplateBase.java
          src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderControlOptionRun.java
          src/main/resources/com/nirima/jenkins/plugins/docker/DockerTemplateBase/config.jelly
          src/main/resources/com/nirima/jenkins/plugins/docker/DockerTemplateBase/help-shmSize.html
          src/test/java/com/nirima/jenkins/plugins/docker/DockerCloudTest.java
          src/test/java/com/nirima/jenkins/plugins/docker/DockerTemplateTest.java
          http://jenkins-ci.org/commit/docker-plugin/aa76e2dd85668f8a99927151ac872bf74de00932
          Log:
          #467: JENKINS-45266: Support for setting shared memory size (--shm-size) for docker slaves

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Bailleau Path: src/main/java/com/nirima/jenkins/plugins/docker/DockerSimpleTemplate.java src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplate.java src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplateBase.java src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderControlOptionRun.java src/main/resources/com/nirima/jenkins/plugins/docker/DockerTemplateBase/config.jelly src/main/resources/com/nirima/jenkins/plugins/docker/DockerTemplateBase/help-shmSize.html src/test/java/com/nirima/jenkins/plugins/docker/DockerCloudTest.java src/test/java/com/nirima/jenkins/plugins/docker/DockerTemplateTest.java http://jenkins-ci.org/commit/docker-plugin/aa76e2dd85668f8a99927151ac872bf74de00932 Log: #467: JENKINS-45266 : Support for setting shared memory size (--shm-size) for docker slaves * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          pjdarton added a comment -

          This was fixed in docker-plugin version 1.1.5

          pjdarton added a comment - This was fixed in docker-plugin version 1.1.5

            ndeloof Nicolas De Loof
            laenzlinger Christof Laenzlinger
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: