Docker is becoming a very popular software container for Linux based deployments. It allows software to be wrapped into containers and deployed onto the server. The container is “jailed” so that it’s processes cannot interfer with others (a sandboxing effect). The container is immutable so any new software deployments would require the software to be re-imaged and deployed but this based on a template which is used to create the image. The containers can be deployed multiple times on different servers so long as Docker is installed (similar to a war file in Java).
Add Docker reposoitory key to keychain:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
Create the file which will tell Apt where the Docker repository is:
touch /etc/apt/sources.list.d/docker.list
Edit the above file and add the following to it:
deb https://get.docker.io/ubuntu docker main
Update Apt with the new repository:
sudo apt-get update
Install Docker:
sudo apt-get install lxc-docker
That’s it! Docker is really easy to install but the hard part is setting up your image.