Articles → MICROSOFT AZURE → Install docker engine on the virtual machine

Install docker engine on the virtual machine






Create a virtual machine




Picture showing creating a virtual machine with the ubuntu image

Click to Enlarge


Execute commands for installation




sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo docker pull nginx:1.17.0
sudo docker run --name sampleapp -p 80:80 -d nginx:1.17.0



Enable port 80 on the virtual machine




Picture showing enabling port 80 on the virtual machine

Click to Enlarge


Output




Picture showing browsing the nginx server home page on the browser

Click to Enlarge


Create the container instance




Picture showing the container instances option in the search box

Click to Enlarge



Picture showing a screen for creating the container instance

Click to Enlarge



Picture showing creating the container using the Create container screen

Click to Enlarge



Picture showing the nginx home page in the browser window once container is created

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, May 16, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250