Installation of Docker on Windows 10 and EC2 Ubuntu Instance

1. Installation on Windows

On windows , we have two different installers for docker . If you have Microsoft windows 10 Professional Or Enterprise 64 bit then you have default docker installer and for all previous versions of windows you need to install Docker toolbox.

Docker Installation Link

2. Installation on Ubuntu (EC2 Instance)                                                                                                                                                                       

 

 

 

  • Click the Select button for a 64Bit Ubuntu image. (i.e. Ubuntu Server 14.04 LTS)

 

 

  • Click the Next: Configure Instance Details button at the bottom right.
  • On the Configure Instance Details step, expand the Advanced Details section.
  • Under User data, select As text.
  • Enter #include https://get.docker.com into the instance User Data.  It will bootstrap Docker by running the shell script located at this URL.

 

 

 

 

  • We may need to set up our Security Group to allow SSH. By default all incoming ports to our new instance will be blocked by the AWS Security Group, so we might just get timeouts when we try to connect.

 

 

 

  • Creating a new key pair:

 

 

 

 

 

 

  • After a few more standard choices where defaults are probably ok, our AWS Ubuntu instance with Docker should be running!
  • Connect to created EC2 instance using MobaXterm tool . First you have to select SSH session and then put the details like EC2 instance public IP , username , .pem file address and hit “Ok” as below –

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Install Docker on Ubuntu – 

To install the latest Ubuntu package (may not be the latest Docker release):

[email protected]:~$ sudo apt-get update

[email protected]:~$ sudo apt-get install docker.io

Then, to enable tab-completion of Docker commands in BASH, either restart BASH or:

source /etc/bash_completion.d/docker

If this command doesn’t work  and throws error like “can’t read /etc/bash_completion.d/docker: No such file or directory” then create docker file inside /etc/bash_completion.d directory.

Now check if docker is running –

[email protected]:/etc/bash_completion.d$ service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-08-15 23:59:39 UTC; 32min ago

If it’s not running, we can start it with start argument:

[email protected]:/etc/bash_completion.d$ service docker start

Bitnami