How to use
docker run -p 8080:8080 -p 50000:50000 h1kkan/jenkins-docker:lts
This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration.
You will probably want to make that an explicit volume so you can manage it and attach to another container for upgrades:
docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home h1kkan/jenkins-docker:lts
this will automatically create a 'jenkins_home' volume on docker host, that will survive container stop/restart/deletion.
Avoid using a bind mount from a folder on host into /var/jenkins_home, as this might result in file permission issue. If you really need to bind mount jenkins_home directory, ensure that directory on host is accessible by the jenkins user in container (jenkins container uid is 1000) or use
-u some_other_userid parameter with
docker run command, so the run command will look like:
docker run -p 8080:8080 -p 50000:50000 -v /path/to/jenkins_home:/var/jenkins_home h1kkan/jenkins-docker:lts
You can also read documentation for official docker image, since they are backward compatible.
Images tagged by respective Jenkins server version which will be provided by image. Lighter alpine based image also available.
Pre-installed Jenkins plugins list: Amazon ECR, Amazon Web Services SDK, Ansible, AnsiColor, Bitbucket, Build Authorization Token Root, Build Timestamp, CloudBees Docker Build and Publish, CloudBees Docker Custom Build Environment, Embeddable Build Status, Environment Injector, GitHub, GitLab, Simple Theme, Timestamper.