Docker Community Forums

Share and learn in the Docker community.

Some installed packages not available during runtime of container

Hello,

I am facing some difficulties with the following Dockerfile:

When I run the image locally, using:

  1. docker run --privileged --dns 9.0.128.50 --dns 9.0.130.50 -d -P --name slave alpine-agent:0.0.1
  2. docker ps and copy the port number
  3. ssh -p jenkins@localhost
  4. password: jenkinspass

I am able to run almost all tools installed, with the following issues:

  1. sonar-scanner is not found
  2. The PATH doesn’t include any of the PATH modifications from the Dockerfile

When I run the image in Jenkins as an agent, almost all tools installed are working, with the following issues:

  1. sonar-scanner is not found
  2. ibmcloud is not found
  3. The PATH doesn’t include any of the PATH modifications from the Dockerfile
  4. sh blocks in Jenkins are failing, for commands such as:
array=(some text some text ...)

With:

syntax error: unexpected "("

I’m having a hard time understanding why this is happening and how to resolve it…