In this tutorial you will get to know
How to install Docker on the Linux Virtual Machine
How to install nginx on Docker Container
Basic Docker commands to play
Apply in-bound rules on the NSG inside VM using Azure portal.
How to create Virtual Machine.
Commands that i have used in this tutorial
// Update the package index
sudo apt-get update
// Install packages to allow apt to use repository over HTTPS
sudo apt-get install apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
// command to add Docker GPG key
curl -fsSL https://download.docker.com/linux/ubu... | sudo apt-key add -
// Setup a repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
// The command to install docker, containerd
sudo apt-get install docker-ce docker-ce-cli containerd.io
// Pull the nginx image
sudo docker pull nginx
// Create a container out of the image
sudo docker run --name webapp -p 80:80 -d nginx