$ sudo docker pull lzhang/jenkins
Run the container:
$ JENKINS_CONTAINER=$(sudo docker run -h 'localhost' -p 8080:8080 -d lzhang/jenkins)
Jenkins will be available on the host machine at port 8080. Specify the hostname to avoid a jenkins error on startup.
Commit the container if you want to save the changes you've made in jenkins:
$ sudo docker commit $JENKINS_CONTAINER lzhang/jenkins
Shutting down the container:
$ sudo docker kill $JENKINS_CONTAINER