Creating an empty EC2 Ubuntu instance and Docker

Pablo Ezequiel Inchausti
4 min readFeb 10, 2017

Let´s create a new EC2 instance

For public and private key for SSH:

I have runned the command

$ ssh-keygen -y

And It promp the private key

Next, upload on AWS

And we able to connect by SSH:

some small .profile editions:

And a Snapshot….

Snapshot Image #01: (Image #01)

We create a backup image #01 with only the .profile edited:

And we have also the snapshot:

Install Docker on Ubuntu

based on

$ sudo apt-get update

$ sudo apt-get install \ curl linux-image-extra-$(uname -r) \ linux-image-extra-virtual

Install using the repository

$ sudo apt-get install apt-transport-https \ software-properties-common \ ca-certificates

$ curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -

$ apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D

$ sudo apt-get install software-properties-common $ sudo add-apt-repository \ “deb https://apt.dockerproject.org/repo/ \ ubuntu-$(lsb_release -cs) \ main”

Install Docker

$ sudo apt-get update

My Ubuntu version is: ubuntu-trusty

based on

ubuntu-trusty

So, next step:

$ sudo apt-get -y install docker-engine=<VERSION_STRING>

is:

$ sudo apt-get -y install docker-engine=1.13.1–0~ubuntu-trusty

I don´t specify the version:

ok, I have docker installed:

docker command

testing hello-world docker:

$ sudo docker run hello-world

Ok, we have docker installed on Ubuntu

We are going to create another snapshot at this point

Snapshot Image #02: (Image #02)

An snapshot / image with ubuntu and docker

The second snapshot is being created

Now at this point we can start to play with docker images without worry about configuration. If we have any problem, we just recover this snapshot…

I will stop at this point this post.

--

--

Pablo Ezequiel Inchausti

#cloud . #mobile ~} Sharing IT while learning It! ... Opinions are for my own