[JIRA] (JENKINS-61498) Docker inside Docker not detected correctly with Windows Containers

3 views
Skip to first unread message

neovortex@gmail.com (JIRA)

unread,
Mar 17, 2020, 12:33:04 AM3/17/20
to jenkinsc...@googlegroups.com
Tiernan Messmer created an issue
 
Jenkins / Bug JENKINS-61498
Docker inside Docker not detected correctly with Windows Containers
Issue Type: Bug Bug
Assignee: Unassigned
Components: docker-workflow-plugin
Created: 2020-03-17 04:32
Priority: Minor Minor
Reporter: Tiernan Messmer

The logic in https://github.com/jenkinsci/docker-workflow-plugin/blob/5191865cd0126b3d25ef11fd03bf932c4178ea91/src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java#L337 currently does not handle windows containers properly.

The result of this is that the magic volumes from container logic https://github.com/jenkinsci/docker-workflow-plugin/blob/1089131014350e11adfa364d34e7717954350261/src/main/java/org/jenkinsci/plugins/docker/workflow/WithContainerStep.java#L181 is not being invoked in cases where it's needed.

In my situation I've worked around the issue by exposing making workspace root a bind mount to the same path on the host, but it would be nice if this "just works".

At least when using the Docker Agent plugin (https://plugins.jenkins.io/docker-plugin/) it looks like the container ID is available inside the job as an environment variable DOCKER_CONTAINER_ID. I imagine this is a special case from the docker-plugin setting this up though. I'm not sure what the correct general way to determine the container id with Windows Containers, but leveraging DOCKER_CONTAINER_ID where available would be better than nothing.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages