Docker Installation

dockerubuntu

I’m installing Docker on my home Ubuntu server in preparation for doing the same on my VPS, so I can put more apps into production on the same server and make the most of any available resources – without having to upgrade my hosting package.

Firstly, I need to check the current kernel version, to make sure my machine is compatible with Docker.

> uname -r

3.13.0-83-generic

 

That’s fine. Just had to be greater than 3.10.

Now, let’s update package info, get keys etc.

> sudo apt-get update

> sudo apt-get install apt-transport-https ca-certificates

> sudo apt-key adv –keyserver hkp://p80.pool.sks-keyservers.net:80recvkeys 58118E89F3A912897C070ADBF76221572C52609D

Next, I need to edit the docker.list file, removing any existing entries and adding a correct entry for my version of Ubuntu, 14.04 (LTS).

> nano /etc/apt/sources.list.d/docker.list

deb https://apt.dockerproject.org/repo ubuntu-trusty main

Update the package info again, purge, and verify that APT is pulling from the correct repo.

> sudo apt-get update

> sudo apt-get purge lxc-docker

> apt-cache policy docker-engine

We need to do some further installing before we can actually get Docker.

> sudo apt-get update

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

And now we can finally install Docker…

> sudo apt-get update

> sudo apt-get install docker-engine

There. Done. To start the Docker daemon, it’s just:

> service docker start

And to make sure Docker is working correctly, attempt to run the “Hello World”, erm, container?

> docker run hello-world

Hello from Docker.

This message shows that your installation appears to be working correctly.

… etc.

Great success! That will do for now. I’ll do another blog when I attempt to put one of my apps into a container. Should be fun.

 

TRP

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s