First go to Azure portal and create ubuntu 18.4 version VM.
Open the Azure VM and
note the IP address and connect to the server using putty
Installing Docker on
Linux
Prerequisite
1. 64 bit version of Ubuntu
2. Network
Connected
3. Uninstall Docker
4.
Make modifications to the Linux package installer (apt) to add docker
repository
5.
Update Package
6.
Install Docker
7. Verify
Ist step Uninstall Docker
sudo apt-get remove docker docker-engine docker-ce docker.io
2nd step Update Packages and Allow Apt to Use a Repository over HTTPS
sudo apt-get update
and
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
3rd Step Add the Docker official GPG key to Apt
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
4th Step Verify That you now have the Docker GPG Key
sudo apt-key fingerprint 0EBFCD88
output:-
admina@ubuntuserver01:~$
sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb)
<docker@docker.com>
sub rsa4096 2017-02-22 [S]
Here we get the official response from Docker. We can see the UID of the Docker release. Everything looks good.
5th Add the Docker Repository to Apt
sudo add-apt-repository \
"deb [arch=amd64]
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
And with that repository added, we're going to do an apt-get update again to download the latest package index now that we have the Docker repository added to our list of repositories. run again, apt-get update.
6th Re-Update the Apt Package Index
sudo apt-get update
7th To install a specific version of Docker Engine, list the available versions in the repo, then select and install:
apt-cache madison docker-ce
set desired version below and execute below command (sudo apt-get install docker-ce=18.03.1~ce~3-0~ubuntu
)
If you didn't want to specify a specific version and just get the latest stable version, you could just do an apt-get install docker-ce. I have added on the equals here to specify the specific version of Docker CE for Ubuntu that we'd like to run.
sudo usermod -aG docker $USER
docker run hello-world
output
admina@ubuntuserver01:~$ docker version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Wed Jun 20 21:43:51 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Wed Jun 20 21:42:00 2018
OS/Arch: linux/amd64
Experimental: false
admina@ubuntuserver01:~$ docker run hello-world
if you do not want to do all these
https://github.com/Azure/azure-quickstart-templates/tree/master/docker-simple-on-ubuntu
Docker Architecture
The Docker Engine is designed as a client server application and it's really made up of three different things.
It starts off with dockerd or the Docker daemon which is installed when you install Docker and that's the server, that's the Docker server itself.
Along with the installation of the Docker Engine, you receive a RESTful API which is important because that defines the interface that all other programs
use to talk to the daemon and there's so many different pieces that make up the typical Docker ecosystem,
both tools from Docker as well as third-party tools.
And then finally, you have the Docker client.
So, this is the actual Docker command that you run as a client to talk to the Docker server, to pull down images, build images and instantiate containers.
No matter what version of Docker you're using whether it's the Community Edition or the Enterprise Edition
the Docker Engine is the required foundation that makes it all possible.
Now let's review the typical Docker architecture.
The Docker daemon is installed on the Docker host.
That Docker host could be your desktop or laptop computer,
it could be a server in the data center or it could be a virtual machine running up in the cloud.
From there, the Docker host is used to execute or instantiate your containers and images.
It's administered through the Docker client which could be on the same host as the Docker daemon or it could be remote.
That's the beauty of the Docker client server architecture.
Using the Docker client you can pull down images from a registry and then execute those images as containers running on the Docker host.
1 comment:
thanks
Post a Comment