Docker in docker volume mount doesn't work I have the below command in my Jenkinsfile:
docker run --rm -v &quot;${WORKSPACE}&quot;:/var/cache/de --entrypoint=/usr/local/bin/pytest ${IMAGE_NAME}:${IMAGE_VERSION} -m &quot;not require_dss&quot; -s -v --cov-report term --cov=app_dss_bundle --junitxml=/var/cache/de/rtest.xml tests

ls -l

I'm running inside docker slave, so it means its docker inside docker. I can't see the rtest.xml in the WORKSPACE afterward (it works for me in my private linux docker env). I already tried to run the suggestion of -v /var/run/docker.sock:/var/run/docker.sock but it didn't help. any other idea?
Single quotes in shell meant to leave the enclosed string 'as is'. That is the variable inside single quotes isn't going to be evaluated. Try changing '${WORKSPACE}' for &quot;${WORKSPACE}&quot;.