Report this

What is the reason for this report?

How to Check for Docker Installation

Posted on July 10, 2015

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



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!

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 $?
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.”

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.