Skip to content

Docker.Image.mountJenkinsUser fails when Build executor runs in a container #8

Closed
@schnatterer

Description

@schnatterer

Problem when using MavenInDocker and running maven like mvn 'install' the following error occurred:

[Pipeline] withDockerContainer
Jenkins seems to be running inside container 6a11e2323ec0b313a455baedc5b28a35dffce026656884298aba4f58149a3b14
$ docker run -t -d -u 1000:1000 -v /var/jenkins_home/workspace/ature_3_continuous_delivery-6HRXLXYING3RPQ2T3ATY6DOVMNEXY7ZFTGPCHQBMB7KHPI2V5JBQ/.jenkins/etc/passwd:/etc/passwd:ro -w /var/jenkins_home/workspace/ature_3_continuous_delivery-6HRXLXYING3RPQ2T3ATY6DOVMNEXY7ZFTGPCHQBMB7KHPI2V5JBQ --volumes-from 6a11e2323ec0b313a455baedc5b28a35dffce026656884298aba4f58149a3b14 -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 ******** --entrypoint cat maven:3.5.0-jdk-8
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
java.io.IOException: Failed to run image 'maven:3.5.0-jdk-8'. 
Error: docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54:
mounting 
/var/jenkins_home/workspace/ature_3_continuous_delivery-6HRXLXYING3RPQ2T3ATY6DOVMNEXY7ZFTGPCHQBMB7KHPI2V5JBQ/.jenkins/etc/passwd 
to rootfs 
/var/lib/docker/aufs/mnt/7b8aadc86829e9cbc74d8e03555a06bdd67d00865f671ac777638cd94bfe2fe9 
at 
/var/lib/docker/aufs/mnt/7b8aadc86829e9cbc74d8e03555a06bdd67d00865f671ac777638cd94bfe2fe9/etc/passwd 
caused not a directory: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions