jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-49531] Docker ps command output is empty when adding a command to the image.run() section

Open
#557 1 comment 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

Scenario 1:

I try to run the Selenoid image via Jenkinsfile with the following command:

stage('Start services') {

docker.image('aerokube/selenoid').
run('--name selenoid ' +
'-p 4444:4444 ' +
'-v C:/workspace/selenoid:/etc/selenoid ' +
'-v C:/workspace/output:/opt/selenoid/video ' +
'-v //var/run/docker.sock:/var/run/docker.sock ' +
'-e "OVERRIDE_VIDEO_OUTPUT_DIR=/C/workspace/output/"',
'-video-output-dir /output')
}

After the completion of this code and run the 

docker ps


 

I don't see any information related to the selenoid. When I try to run this command from my PC manually I see the following: 

docker: Error response from daemon: Conflict. The container name "/selenoid" is already in use by container "ce43d0476d5d388d8471e6891b981df8b2e52206f94c3f7f2b81180ae95de821". You have to remove (or rename) that container to be able to reuse that name.


Please see the docker logs for this container:

2018/02/13 14:13:32 Loading configuration files...

2018/02/13 14:13:32 /usr/bin/selenoid: browsers config: read error: open config/browsers.json: no such file or directory

 

Scenario 2:

If I delete the next command

 '-video-output-dir /output'

 

selenoid runs and I see it in the docker ps output. But without this parameters, I'm unable to link the video to the output dir. Please see the following logs:

2018/02/13 14:10:37 Loading configuration files...

2018/02/13 14:10:37 Loaded configuration from [/etc/selenoid/browsers.json]
2018/02/13 14:10:37 Using default containers log configuration because of: read error: open config/container-logs.json: no such file or directory
2018/02/13 14:10:37 Timezone: Local
2018/02/13 14:10:37 Video Dir: /opt/selenoid/video
2018/02/13 14:10:37 Listening on :4444
2018/02/13 14:12:02 [NEW_REQUEST]
2018/02/13 14:12:02 [NEW_REQUEST_ACCEPTED]
2018/02/13 14:12:02 [0] [LOCATING_SERVICE] [chrome-]
2018/02/13 14:12:02 Using default version: 62.0
2018/02/13 14:12:02 [0] [USING_DOCKER] [chrome-62.0]
2018/02/13 14:12:02 [0] [CREATING_CONTAINER] [selenoid/vnc:chrome_62.0]
2018/02/13 14:12:02 [0] [STARTING_CONTAINER] [selenoid/vnc:chrome_62.0] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9]
2018/02/13 14:12:03 [0] [CONTAINER_STARTED] [selenoid/vnc:chrome_62.0] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9] [1.2498233s]
2018/02/13 14:12:03 [0] [CREATING_VIDEO_CONTAINER] [selenoid/video-recorder]
2018/02/13 14:12:04 [0] [REMOVING_CONTAINER] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9]
2018/02/13 14:12:05 [0] [CONTAINER_REMOVED] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9]
2018/02/13 14:12:05 [0] [SERVICE_STARTUP_FAILED] [unknown] [start video container: create video container: Error response from daemon: invalid volume specification: 'C:/workspace/output/:/data:rw']

---
Originally reported by mkgerasimenko, imported from: Docker ps command output is empty when adding a command to the image.run() section


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

Raw content of original issue

Scenario 1:
I try to run the Selenoid image via Jenkinsfile with the following command:



stage('Start services') {

docker.image('aerokube/selenoid').
run('--name selenoid ' +
'-p 4444:4444 ' +
'-v C:/workspace/selenoid:/etc/selenoid ' +
'-v C:/workspace/output:/opt/selenoid/video ' +
'-v //var/run/docker.sock:/var/run/docker.sock ' +
'-e "OVERRIDE_VIDEO_OUTPUT_DIR=/C/workspace/output/"',
'-video-output-dir /output')
}


After the completion of this code and run the 



docker ps



 

I don't see any information related to the selenoid. When I try to run this command from my PC manually I see the following: 



docker: Error response from daemon: Conflict. The container name "/selenoid" is already in use by container "ce43d0476d5d388d8471e6891b981df8b2e52206f94c3f7f2b81180ae95de821". You have to remove (or rename) that container to be able to reuse that name.



Please see the docker logs for this container:



2018/02/13 14:13:32 Loading configuration files...

2018/02/13 14:13:32 /usr/bin/selenoid: browsers config: read error: open config/browsers.json: no such file or directory


 

Scenario 2:
If I delete the next command



 '-video-output-dir /output'


 

selenoid runs and I see it in the docker ps output. But without this parameters, I'm unable to link the video to the output dir. Please see the following logs:



2018/02/13 14:10:37 Loading configuration files...

2018/02/13 14:10:37 Loaded configuration from [/etc/selenoid/browsers.json]
2018/02/13 14:10:37 Using default containers log configuration because of: read error: open config/container-logs.json: no such file or directory
2018/02/13 14:10:37 Timezone: Local
2018/02/13 14:10:37 Video Dir: /opt/selenoid/video
2018/02/13 14:10:37 Listening on :4444
2018/02/13 14:12:02 [NEW_REQUEST]
2018/02/13 14:12:02 [NEW_REQUEST_ACCEPTED]
2018/02/13 14:12:02 [0] [LOCATING_SERVICE] [chrome-]
2018/02/13 14:12:02 Using default version: 62.0
2018/02/13 14:12:02 [0] [USING_DOCKER] [chrome-62.0]
2018/02/13 14:12:02 [0] [CREATING_CONTAINER] [selenoid/vnc:chrome_62.0]
2018/02/13 14:12:02 [0] [STARTING_CONTAINER] [selenoid/vnc:chrome_62.0] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9]
2018/02/13 14:12:03 [0] [CONTAINER_STARTED] [selenoid/vnc:chrome_62.0] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9] [1.2498233s]
2018/02/13 14:12:03 [0] [CREATING_VIDEO_CONTAINER] [selenoid/video-recorder]
2018/02/13 14:12:04 [0] [REMOVING_CONTAINER] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9]
2018/02/13 14:12:05 [0] [CONTAINER_REMOVED] [bd843e51d94563a69a8e54651b4cc71cd6543684c1af08460e738823e23610b9]
2018/02/13 14:12:05 [0] [SERVICE_STARTUP_FAILED] [unknown] [start video container: create video container: Error response from daemon: invalid volume specification: 'C:/workspace/output/:/data:rw']

  • environment: Windows 10 x64; Docker client/server version: 17.12.0-ce; Docker plugin: 1.1.2; Docker pipeline: 1.15; Jenkins version: 2.0.50727

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.