How to Check for Docker Installation

Does Ubuntu 14.04 have Docker already installed, how do I find out if I have it installed or not?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

We already created a droplet on which we host our site. Can we still create and apply a Docker on this droplet? Basically we want to install PEPS on our system, but needed to install Docker first, any tip on easier way to install Docker on the system?

Ubuntu 14.04 does not come with Docker pre-installed by default. There is a Docker “one-click” image available on the “Applications” tab of the create page:

To check if it is installed, you can simply run the command. If you need to do this programmatically, you can check the exit code by running echo $?. If it’s installed, you’ll see:

$ docker -v
Docker version 1.7.0, build 0baf609
$ echo $?

If it’s not installed, you’ll see:

$ docker -v
The program 'docker' is currently not installed. You can install it by typing:
apt-get install docker
$ echo $?

The exit code 0 means that the command was successful, and the code 127 mean “command not found.”