Setting up Docker on Azure with Ubuntu server
Here are instructions to setup your own Docker on Azure with an Ubuntu server.
Build a new Ubuntu Server
Log on your Azure portal and go to Marketplace. Search for ubuntu and select a version you want.
Input your VM name, user name, and resource group. Select your preferred location if needed.
Select your preferred authentication type:
SSH public key
Open Terminal (on Mac) or Git Bash (on Windows) and input command
ssh-keygen -t rsa -b 4096 -C “email@example.com”.
Copy public key using command:
pbcopy < ~/.ssh/dockerdemo.pub
clip < ~/.ssh/dockerdemo.pub
Paste the public key in SSH public key field.
Click OK to go to step 2 and choose your VM size. You may start with the smallest one as you can scale it up later.
You can leave default settings in step 3.
Click OK to start deployment.
It will take around one minute to finish the deployment.
Install Docker on Ubuntu
Open the VM and note the IP address. (You may assign a sub domain name and/or make the IP static by clicking it.)
You can connect to Ubuntu with
ssh username@IPAddress -i ~/.ssh/privatekey
docker to see if a docker is installed. If not, it will show you the command to install it.
Before installing docker, upgrade the system with command
sudo apt update and
sudo apt upgrade.
After the upgrade is done, install docker using command
sudo apt install docker.io.
Test docker by running hell0-world application using command
sudo docker run hello-world.
There are two methods for installing Docker on Ubuntu 16.04. One method involves installing it on an existing…www.digitalocean.com