MirrorNest
← Tutte le guide

Jenkins

Jenkins is a widely used, extensible open-source automation server for building, testing, and deploying software through CI/CD pipelines defined in Jenkinsfiles.

Sistema: Any Docker hostDevOpsCI/CDSito ufficiale ↗Documentazione ufficiale ↗
Questa guida è redatta a partire dalla documentazione ufficiale di Jenkins, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
  1. 1Prerequisites

    256MB RAM minimum (more for real pipelines), 10GB free disk space recommended, and Docker installed on the host.

  2. 2Run the Jenkins container

    docker run -p 8080:8080 -p 50000:50000 --restart=on-failure -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts-jdk21

    Port 8080 serves the web UI; port 50000 is used for inbound JNLP agent connections. jenkins_home is a named Docker volume so plugins and config survive container recreation.

  3. 3Retrieve the initial admin password

    docker exec <container_id_or_name> cat /var/jenkins_home/secrets/initialAdminPassword
  4. 4Unlock Jenkins

    Open http://localhost:8080, paste in the initial admin password, then choose 'Install suggested plugins' (or select plugins manually).

  5. 5Create the first admin user

    Follow the setup wizard to create your own admin account and set the Jenkins URL, replacing the temporary admin/password unlock step.