Installation of Jenkins
To install Jenkins using Docker, you can follow these steps:
Install Docker: Ensure that Docker is installed on your system. You can download and install Docker from the official Docker website (https://www.docker.com/get-started).
Pull the Jenkins Docker image: Open a terminal or command prompt and execute the following command to pull the Jenkins Docker image from Docker Hub:
This command will download the latest version of the Jenkins Docker image.
Run the Jenkins container: Once the image is pulled, run the Jenkins container using the following command:
This command starts the Jenkins container in detached mode (
-d
) and maps port 8080 from the container to the host machine (-p 8080:8080
). It also maps port 50000 for Jenkins agent communication (-p 50000:50000
) and sets the container name as "jenkins" using the--name
flag.Wait for Jenkins to start: It may take a few moments for the Jenkins container to start up. You can monitor the container's logs by running the following command:
Wait until you see a log line indicating that Jenkins is up and running. You should see a message like: "Jenkins is fully up and running".
Access Jenkins web interface: Once Jenkins is up and running, you can access the Jenkins web interface by opening a web browser and navigating to
http://localhost:8080
. This will take you to the Jenkins initial setup wizard.Unlock Jenkins: The first time you access Jenkins, you will be prompted to enter an initial admin password. Retrieve the password from the Jenkins container logs by running the following command:
Copy the password and paste it into the Jenkins web interface to unlock Jenkins.
Follow the Jenkins setup wizard: Proceed through the Jenkins setup wizard to customize your installation. You can install recommended plugins or choose specific plugins based on your requirements. Follow the instructions to create an admin user and complete the setup.
Start using Jenkins: Once the setup is complete, you can start using Jenkins for your CI/CD workflows. You can create jobs, configure pipelines, and integrate with your version control system and other tools.
By following these steps, you can install Jenkins using Docker and access the Jenkins web interface to begin configuring and using Jenkins for your continuous integration and deployment needs.
Last updated