VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04

⇱ How To Install and Use Docker on Ubuntu 16.04 | DigitalOcean


How To Install and Use Docker on Ubuntu 16.04

Updated on October 20, 2018
Not using Ubuntu 16.04?
Choose a different version or distribution.
Ubuntu 16.04
πŸ‘ How To Install and Use Docker on Ubuntu 16.04

Introduction

Docker is an application that makes it simple and easy to run application processes in a container, which are like virtual machines, only more portable, more resource-friendly, and more dependent on the host operating system. For a detailed introduction to the different components of a Docker container, check out The Docker Ecosystem: An Introduction to Common Components.

There are two methods for installing Docker on Ubuntu 16.04. One method involves installing it on an existing installation of the operating system. The other involves spinning up a server with a tool called Docker Machine that auto-installs Docker on it.

In this tutorial, you’ll learn how to install and use it on an existing installation of Ubuntu 16.04.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author(s)

Jack of all trades, master of a few

Technical Editor, DigitalOcean

Still looking for an answer?

Was this helpful?

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!

I only can say that: I get at your feet. Excellent tutorial

Thank you very much for your article. It’s really excellent!. Please keep going

Its probably better to use the Ubuntu APT tools to update the APT configuration. Instead of echo, use apt-add-repository to manipulate the apt sources:

sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'

I had some trouble with docker failing to run after some updates to a 16.04 droplet. The solution was to install a dependency not mentioned above but recommended in Docker’s instructions for 16.04:

sudo apt-get install linux-image-extra-$(uname -r)

After which I was able to get Docker running again.

Hi,

I have followed the tutorial, but I get this message

__docker_machine_ps1: command not found

Great tutorial, easy to follow, and no problems along the way. Thank you!

Well, it’s not working for me. After I try running a ubuntu container, I get the following Error:

docker: failed to register layer: devmapper: Error mounting β€˜/dev/mapper/docker-8:2-526216-d9cc121a2c92ab980cbf1218ba4f467d6cc27248993b1a79165e7602113d88b0’ on β€˜/var/lib/docker/devicemapper/mnt/d9cc121a2c92ab980cbf1218ba4f467d6cc27248993b1a79165e7602113d88b0’: invalid argument.

Have anybody a solution?

Well it doesn’t work for me. It get this error when I try to run a container:

docker: failed to register layer: devmapper: Error mounting β€˜/dev/mapper/docker-8:2-526216-d9cc121a2c92ab980cbf1218ba4f467d6cc27248993b1a79165e7602113d88b0’ on β€˜/var/lib/docker/devicemapper/mnt/d9cc121a2c92ab980cbf1218ba4f467d6cc27248993b1a79165e7602113d88b0’: invalid argument.

Does anybody has any solution?

πŸ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Β© 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.