I was using Docker in the old way, with a volume container:
docker run -d --name jenkins-data jenkins:tag echo \"data-only container for Jenkins\"
You can reduce the accepted answer to one line using, e.g.
docker run --rm -v `pwd`:/src -v my-jenkins-volume:/data busybox cp -r /src /data