← Todos os guias
Jenkins
Jenkins is a widely used, extensible open-source automation server for building, testing, and deploying software through CI/CD pipelines defined in Jenkinsfiles.
Este guia foi elaborado a partir da documentação oficial do Jenkins, ligada acima — verifique sempre lá os nomes exatos dos pacotes/versões antes de executar estes comandos num servidor de produção, uma vez que as versões da distribuição e do projeto mudam com o tempo.
1Prerequisites
256MB RAM minimum (more for real pipelines), 10GB free disk space recommended, and Docker installed on the host.
2Run the Jenkins container
docker run -p 8080:8080 -p 50000:50000 --restart=on-failure -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts-jdk21Port 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.
3Retrieve the initial admin password
docker exec <container_id_or_name> cat /var/jenkins_home/secrets/initialAdminPassword4Unlock Jenkins
Open http://localhost:8080, paste in the initial admin password, then choose 'Install suggested plugins' (or select plugins manually).
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.