Docker inside Docker not detected correctly with Windows Containers

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Tiernan Messmer
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: