Docker Community Forums

Share and learn in the Docker community.

Volume and users


(Antoineozenne) #1

Hello,

Using Jenkins, I use this image https://hub.docker.com/_/maven/ to build my maven project with :

VOLUME_ID=\$(docker volume create --driver local --opt type=none --opt device=$WORKSPACE/XXXX --opt o=bind)
docker run --rm --name XXXX -v \${VOLUME_ID}:/usr/src/mymaven -w /usr/src/mymaven maven:3-jdk-8 mvn clean install -X
docker volume rm \${VOLUME_ID}

Everything is going well, but the generated target folder has a uid:gid I don’t know. So my Jenkins can’t delete this folder.
I would like to generate this folder with the user who launches this container.
Have you an idea ? Or maybe I don’t use the right method ?

Thank you in advance.