Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins docker agent not executing correctly #55

Open
pahalampi opened this issue Jan 26, 2023 · 0 comments
Open

Jenkins docker agent not executing correctly #55

pahalampi opened this issue Jan 26, 2023 · 0 comments

Comments

@pahalampi
Copy link

While teaching Jenkins using this kata, multiple students confronted an issue where agents defined as docker containers would not execute.

The problem was persistent throughout different OS's and environments: some were running Vagrant (VirtualBox) on Windows, some Docker Desktop on Windows or macOS.

I personally could not reproduce the problem. My environment was running Jenkins on Docker Desktop (Windows) and everything worked as expected.

Only consistent messages that showed in the logs every time the problem occurred was

...
Jenkins does not seem to be running inside a container - -
...

while everywhere where things worked, the corresponding log-entry was

[Pipeline] sh
+ docker inspect -f . gradle:6-jdk11
.
[Pipeline] withDockerContainer
Jenkins seems to be running inside container 7886fea1c6ff2c3c59dba72500f73d00693fc64e06b600635c16c5ec8d76e2f2
$ docker run -t -d -u 0:0 -w /var/jenkins_home/workspace/jenkins-katas_master@2 --volumes-from 7886fea1c6ff2c3c59dba72500f73d00693fc64e06b600635c16c5ec8d76e2f2 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** gradle:6-jdk11 cat
$ docker top 58d0ce76181245e4e5a72a3f93718ce18da85a00a159d4ea3d5b78ede3012854 -eo pid,comm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant