Every time developer makes code changes, you would want to
Jenkins to automate Docker images creation and pushing into Docker
registry. Let us see how to do this.
Pre-requisites:
Jenkins is up and running
Docker is installed in Jenkins machine. Click here to learn how to install Docker.
Docker plug-in installed in Jenkins.
Docker pipeline plug-in installed in Jenkins.
Steps:
Now Login to Jenkins EC2 instance, execute below commands:
Pre-requisites:
Jenkins is up and running
Docker is installed in Jenkins machine. Click here to learn how to install Docker.
Docker plug-in installed in Jenkins.
Docker pipeline plug-in installed in Jenkins.
Steps:
Now Login to Jenkins EC2 instance, execute below commands:
Add jenkins user to Docker group
sudo usermod -a -G docker jenkins
Restart Jenkins service
sudo service jenkins restart
Reload system daemon files
sudo usermod -a -G docker jenkins
Restart Jenkins service
sudo service jenkins restart
Reload system daemon files
sudo systemctl daemon-reload
Restart Docker service as well
sudo service docker stop
sudo service docker startRestart Docker service as well
sudo service docker stop
Watch the above steps in YouTube video:
this is what i am looking for, thank you sir
ReplyDeletethank you, glad it was helpful!
DeleteWhy can't i run above commands in my mac?
ReplyDeleteHow you'll integrate if Docker is installed on different ubuntu VM?
ReplyDeleteWhy we need to add jenkins user to docker group?
ReplyDelete