docker network create jenkins
docker run \
--detach \
--rm \
--net=jenkins \
--volume=jenkins_home:/var/jenkins_home:rw \
--volume=/var/run/docker.sock:/var/run/docker.sock:rw \
--publish=8080:8080 \
--env=JAVA_OPTS=-DexecutableWar.jetty.sessionIdCookieName=dockerjenkins \
--name=jenkins \
jenkins/jenkins:lts
# Needed to login initially.
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword |
pbcopy