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

Global Tool Configuration not working from 2.346-alphine docker image

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • core
    • Jenkins is installed using the docker image(jenkins/jenkins) on Linux machine.
      Version: 2.345-alpine

      We are currently using Jenkins 2.345-alpine version as part of the docker container. Jenkins is giving issues with the configured Global Tools such as NodeJS, Docker, JAVA, etc. All the configured Global Tools setting is unharmed after the upgrade but Jenkins is giving the following errors from 2.346-alpine version and above.

      Reference Errors faced while building the pipeline: 

      NodeJS : 
      $ /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs/bin/npm install -g npm install -g
      env: 'node': No such file or directory
      Docker:
      /var/jenkins_home/workspace/docker@tmp/durable-507b78de/script.sh: line 1: docker: not found
      JAVA:
      /var/jenkins_home/tools/hudson.model.JDK/sonar-jdk11/bin/java: not found
       

      I have tried upgrading the plugins but that doesn't seems to work. When I downgrade it back to 2.345-alphine it works fine.

          [JENKINS-68709] Global Tool Configuration not working from 2.346-alphine docker image

          Basil Crow added a comment -
          1. First, you have filed this issue in the wrong issue tracker. Docker issues are tracked in https://github.com/jenkinsci/docker/issues
          2. Second, you have provided no steps to reproduce the problem from scratch on a clean installation. This makes it far less likely others will be motivated to help you.
          3. Third, you are building jobs on the built-in node, which we explicitly recommend against.

          I suspect the relevant change is jenkinsci/docker#1361, wherein glibc was removed from Alpine images. The tools you are trying to use require glibc. The only guarantee we make about the Docker images for the controller is that their configuration is sufficient to run Jenkins itself. In all likelihood you were relying on an internal implementation detail (the availability of glibc on the controller) in your jobs. That implementation detail was subject to change at any time, and it did change recently.

          Your options are:

          • Do not run jobs on the controller's built-in node (recommended). Instead run them on an agent as described in the documentation.
          • If you must run jobs on the controller and want to use generic third-party binaries that require glibc, use the Debian or Debian Slim Docker images (which have glibc) rather than the Alpine image (which does not have glibc, intentionally - because Alpine is not a GNU distribution).
          • If you must run jobs on the controller and want to keep using the Alpine Docker image, build a custom Docker image that extends from the official Jenkins Alpine image and install glibc yourself (then use glibc-based binaries), or install the tools you want from Alpine's repositories with apk (these don't need glibc because they come from Alpine).

          I am closing this ticket for three reasons: because it is filed in the wrong issue tracker, because it has no steps to reproduce the problem from scratch, because the reported issue goes against what we recommend in the documentation, and because it is likely you are relying on internal implementation details rather than a committed interface in the first place. The change to remove glibc from the Alpine images was intentional and we do not intend to change it.

          Basil Crow added a comment - First, you have filed this issue in the wrong issue tracker. Docker issues are tracked in https://github.com/jenkinsci/docker/issues Second, you have provided no steps to reproduce the problem from scratch on a clean installation. This makes it far less likely others will be motivated to help you. Third, you are building jobs on the built-in node, which we explicitly recommend against . I suspect the relevant change is jenkinsci/docker#1361 , wherein glibc was removed from Alpine images. The tools you are trying to use require glibc. The only guarantee we make about the Docker images for the controller is that their configuration is sufficient to run Jenkins itself. In all likelihood you were relying on an internal implementation detail (the availability of glibc on the controller) in your jobs. That implementation detail was subject to change at any time, and it did change recently. Your options are: Do not run jobs on the controller's built-in node (recommended). Instead run them on an agent as described in the documentation . If you must run jobs on the controller and want to use generic third-party binaries that require glibc, use the Debian or Debian Slim Docker images (which have glibc) rather than the Alpine image (which does not have glibc, intentionally - because Alpine is not a GNU distribution). If you must run jobs on the controller and want to keep using the Alpine Docker image, build a custom Docker image that extends from the official Jenkins Alpine image and install glibc yourself (then use glibc-based binaries), or install the tools you want from Alpine's repositories with apk (these don't need glibc because they come from Alpine). I am closing this ticket for three reasons: because it is filed in the wrong issue tracker, because it has no steps to reproduce the problem from scratch, because the reported issue goes against what we recommend in the documentation, and because it is likely you are relying on internal implementation details rather than a committed interface in the first place. The change to remove glibc from the Alpine images was intentional and we do not intend to change it.

            Unassigned Unassigned
            aditi_97 Aditi Varade
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: