Tuesday, 15 February 2022

How to Pull images from a Docker Repository and Run a container- Install jenkins using docker

 You can pull images from a Docker Repository by first looking for the image in a Docker repository eg Docker Hub, Then copy the image tag and run docker pull with the tag name

Step 1. Find the Image(Eg Jenkins)


Step 2.  Use the image name to pull the image


Here the official image name is : jenkins/jenkins:lts

Step 3. On your Docker host, Pull the image using docker pull command
docker pull jenkins/jenkins:lts

Step 4: View your image
docker images


Step 5: Run your image to get your container using the image name or image id

docker run -it -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts  Or

docker run -it -p 8080:8080 -p 50000:50000 image_id



Your Jenkins container is now running on Port 8080, You can access it by going to your Public ip:8080 on ur browser



No comments:

Post a Comment

How to upgrade Maven

  java.lang.IllegalStateException I had installed maven in my ubuntu using command  apt install maven This installed maven in path /usr/shar...