Docker > Docker >> Docker Images and Containers Views : 29
Rate This Article :

How to configure docker on linux Virtual Machine

Below are the Prerequisites to configure docker on Linux Virtual machine.

1.       Configure Linux VM. Checkout this link.

2.       Create image and publish it to docker hub. Checkout this link.

Below steps will help to configure docker, pull docker image from docker hub and deploy it in Container.

1.       To configure the Linux machine with Apache, click on the link.

2.       To install docker on the Linux Machine. Run the below command

sudo curl -fsSL get.docker.com | /bin/bash

3.       Add user to docker, Run the below command to add a user for docker.
sudo usermod -aG docker Ubuntu

4.       Start the Docker Service
sudo service docker restart
 

5.       Pull Image from docker hub. To login into docker, use the below command.
docker login

Provide docker hub credentials to enable download the image from docker

6.       Pull image from docker hub (user should do the login before this)

docker pull <username/imagename>

7.       Check whether image is present or not. Run the below command to verify the docker images is downloaded or not.

docker images

8.       deploy docker image in Container by running the below command

docker run -d -p 5060:80 --name <containername> <username/imagename:tag>

Verify the deployment done successfully by browsing through the “5060” port. For e.g. http://URL:PORT/

About Author
Raj Kumar
Total Posts 40
Developer in .Net!
Comment this article
Name*
Email Address* (Will not be shown on this website.)
Comments*
Enter Image Text*
   
View All Comments
Comments not posted yet!! Please post your comments on this article.
  Privacy   Terms Of Use   Advertise With Us   Contact Us
© 2016 Developerin.Net. All rights reserved.
Trademarks and Article Images mentioned in this site may belongs to Microsoft and other respective trademark owners.
Articles, Tutorials and all other content offered here is for educational purpose only and its author copyrights.