Quick start
docker run -d \
--name jenkins \
-p 8080:8080 \
-p 50000:50000 \
-v jenkins_home:/var/jenkins_home \
jenkins/jenkins:lts-jdk21| Port | Purpose |
|---|---|
8080 | Web UI |
50000 | Agent → controller (inbound agents) |
Unlock Jenkins
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword- Open
http://localhost:8080 - Paste the admin password
- Install suggested plugins
- Create the first admin user
Persist data
The jenkins_home volume keeps jobs, plugins, and credentials across container restarts.
docker stop jenkins
docker start jenkinsFor AWS/EC2 labs, open security group port 8080 to your IP only — never 0.0.0.0/0 for long.