jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-47026] User not completely set in docker containers

Open
#522 14 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

When running a build inside a docker container, some commands don't work because they rely on the user being properly set. For example, ssh doesn't work with the following error:

 

No user exists for uid 150.

 

I think this could be solved by append to passwd on container startup, something like this (untested, for proof of concept):

if [ "$(id -u)" != "0" ]; then

    echo "jenkins:x:$(id -u):$(id -g):Jenkins:${HOME}:/sbin/nologin" >> /etc/passwd

fi

---
Originally reported by edahlseng, imported from: User not completely set in docker containers


  • status: Open
  • priority: Major
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 6
  • watchers: 12
  • imported: 2025-12-07

Raw content of original issue

When running a build inside a docker container, some commands don't work because they rely on the user being properly set. For example, ssh doesn't work with the following error:

 

No user exists for uid 150.

 

I think this could be solved by append to passwd on container startup, something like this (untested, for proof of concept):

if [ "$(id -u)" != "0" ]; then

    echo "jenkins:x:$(id -u):$(id -g):Jenkins:${HOME}:/sbin/nologin" >> /etc/passwd

fi

  • environment: Jenkins Core 2.73

2 attachments

- [Jenkinsfile](https://issues.jenkins.io/secure/attachment/41384/Jenkinsfile)
- [build_log.txt](https://issues.jenkins.io/secure/attachment/41383/build_log.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.