Question

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

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 $?
0

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 $?
127

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