Before you start with the installation and you haven't heard about Docker yet, I recommend to check out my post: What is Docker and why you should care.
After you are set up with the basics behind docker we will install Docker in this post:
Since Docker was just announced to run nativly on Windows it does not yet by the time of writing this blog post. That's why this tutorial will go through the installation on Ubuntu. To get started you would need to have a Unix environment handy. I happen to have a Virtualbox with Ubuntu.
First you want to check which Ubuntu Version is actively running with
Results can look like this screen:
Based on our gained information head over to the Docker website and check out the docs how to install Docker on Ubuntu 14.04 (Trusty).
If you are running the same version as me just keep going.
Since the package manager could be outdated I certainly want to get the latest version of Docker. For that I need to configure apt-get so that it can deal with https as a prerequisite.
To check for https support we simply need to list all files in following folder and look for https, like seen below.
Looks like we are all set.
Then we want to add Docker to the our local keychain
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
Next step is to add Docker to the package list
$ sudo sh -c "echo deb https://get.docker.com/ubuntu docker main\ /etc/apt/sources.list.d/docker.list `
After that you just need to update the package list
$ sudo apt-get update
And install lxc-docker
$ sudo apt-get install lxc-docker
To verify the installation execute following command
$ sudo docker run –it ubuntu /bin/bash
Docker now downloads the latest Ubuntu image and executes /bin/bash on it
Voila done! We could execute the our know command from the beginning to find out which version we are running within the Docker container…
We basically installed the Docker environment downloaded an Ubuntu container and hocked it up so that we can access the bash. We discovered What is Docker and why you should care.
If you are on Mac, you should also consider taking advantage of vagrant: check out the docs here https://docs.vagrantup.com/v2/docker/basics.html
With this you should be all set to try it out yourself. Now go and build something!