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:ltsStep 3. On your Docker host, Pull the image using docker pull command
docker pull jenkins/jenkins:lts
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