I'm having a Jenkins docker container which i had to take a copy of it to push into AWS ECR. So, when I run below command to create an image from running container with existing Jenkins jobs, it started fresh jenkins without any jobs (ie no workspace folder in var/jenkins_home).
docker commit 76df6fa99373 jenkins-dev
docker run --name jenkins-dev -p 8080:8080 -p 50000:50000 jenkins-dev
But I need the old jobs in the new container as well. How can it be achieved? Do I need to copy workspace from old container to new container?