-
Bug
-
Resolution: Unresolved
-
Blocker
-
Jenkins ver. 2.138.3
Powershell Plugin : 1.3
Docker Pipeline: 1.17
The powershell plugin when used within docker container enters a hang state. I would expect it to fail if powershell core is not installed, which works if the same thing is ran outside docker. The jenkins agent is a Ubuntu 16.04 machine.
I dont see any other process also running within the docker container in the hung state except cat
//
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
xxxx alpine:latest "cat" 5 minutes ago Up 5 minutes ecstatic_galileo
PS /home/administrator> docker top 2a2a21fe5dbc
WARNING: Error loading config file: /home/administrator/.docker/config.json: open /home/administrator/.docker/config.json: permission denied
UID PID PPID C STIME TTY TIME CMD
adminis+ 5372 5350 0 07:39 pts/0 00:00:00 cat
//Sample Jenkinsfile
timestamps {
//linux docker
node("LinuxDocker") {
//Works
docker.image("alpine:latest").inside
// Hangs
docker.image("alpine:latest").inside
{ powershell(script:"echo command inside docker") }}
}
Hung output
==================================================
[Pipeline]
$ docker top <xxxxguid> -eo pid,comm
WARNING: Error loading config file: /home/administrator/.docker/config.json: open /home/administrator/.docker/config.json: permission denied
$ docker stop --time=1 <xxxxguid>
$ docker rm -f <xxxxguid>
[Pipeline] // withDockerContainer
[Pipeline] sh
20:39:32 + docker inspect -f . alpine:latest
20:39:32 WARNING: Error loading config file: /home/administrator/.docker/config.json: open /home/administrator/.docker/config.json: permission denied
20:39:32 .
[Pipeline] withDockerContainer
20:39:32 dockerLinux does not seem to be running inside a container
$ docker run -t -d -u 1000:1000 -w /home/agent/workspace/ation_test_dockertestexecute -v /home/agent/workspace/ation_test_dockertestexecute:/home/agent/workspace/ation_test_dockertestexecute:rw,z -v /home/agent/workspace/ation_test_dockertestexecute@tmp:/home/agent/workspace/ation_test_dockertestexecute@tmp:rw,z -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 ******** alpine:latest cat
[Pipeline] {
[Pipeline] powershell
$ docker top <hguid> -eo pid,comm