Install Docker On Ubuntu 16.04

Docker is a container platform that streamlines software delivery and provides isolation, scalability, and efficiency with less overhead than OS level virtualization.

  1. Install Docker Machine On Ubuntu 16.04
  2. Install Docker On Ubuntu 16.04 Xenial
  3. Install Docker On Ubuntu Xenial
  4. Install Docker On Ubuntu 16.04 32 Bit

Download Ubuntu Server LTS from here and install it on the first node. We will call this node a MAAS node. Make sure that both NICs have IP addresses configured. We will use and respectively. Then install prerequisites. Aug 14, 2019 In this article we will discuss how to install and setup community docker-ce (community edition) on Ubuntu 18.04 /16.04 LTS, prerequisite of Docker-CE is listed below: 64-bit OS Kernel version 3.10 or higher.

These instructions are taken directly from the official Docker for Ubuntu page, but I wanted to reiterate those tasks essential for installing the Docker Community Edition on Ubuntu 14.04 and 16.04.

Uninstall older versions

Install extra packages

In order to use the aufs storage driver, install the following packages.

Install Docker On Ubuntu 16.04

Setup Docker Repository

Install docker on ubuntu 16.04

Install Docker Community Edition

The above command installs the Docker engine and client. If you just want the Docker client, see the section further down.

On Ubuntu 14.04 using upstart, docker logs can be found at “/var/log/upstart/docker.log”.

On Ubuntu 16.04 using systemd, the docker engine logs can be viewed by “journalctl -u docker.service”

Validate Install

The docker run command from above should return a message like:

Docker via TCP

By default, the docker daemon listens on a local unix port owned by root (/run/docker.sock) which means your docker client will only work from the installed server and as sudo.

Modify ‘/etc/default/docker’ and modify the options so that TCP is the standard port:

On Ubuntu 16.04 using Systemd, this file is not going to be read, so we have to make its existence known in the “/lib/systemd/system/docker.service” script. Comment out the ExecStart line that exists and replace it as shown below.

Now make sure the firewall allows this port, and restart the service:

Then use the DOCKER_HOST environment variable to inform the docker client where you wish to connect, and run a quick test of the client.

The export statement can be appended to “~/.profile” and sourced to take affect upon every login.

One side-effect of using the TCP port and not the root-owned local unix port, is you no longer need to prefix docker client commands with ‘sudo’. However, you lose the auditability provided by sudo logging the command and parameters (‘/var/log/auth.log’ on Ubuntu).

Docker Client Only

Clearly, if you have a client-only install, then you need to read the above section first because your remote Docker engine needs to be listening, and your client host needs DOCKER_HOST to point to the remote Docker engine. You cannot reach the Docker engine with a unix port.

Install Docker Machine On Ubuntu 16.04

If you need to install the Docker client only, and not the full Docker engine, then you have to do a manual download of the release archive, and extract the binary as described here.

The exact archive name for your desired version can be pulled from the release list.

Docker Compose

If you want to install docker-compose, you can do so with Python’s pip “sudo pip install docker-compose”, but you are going to get an older version. It is better to install the latest release (check for the latest version here).


This Collabora install is used for integration with Nextcloud.

1. Create subdomain for the Collabora online server

2. Install a valid SSL certificate

See How To Issue LetsEncrypt ACMEv2 Wildcard Certs

3. Add a new nginx server block

Add this code to the end of an existing server block or create a new server block for the subdomain you created above. Substitute the server_name for the correct subdomain name and the ‘/path/to/certificate' to the path to your ssl certificate:

4. Install Docker

See How To Install Docker On Ubuntu 16.04

5. Install the Collabora online server

Make sure to use the back slashes in the url to escape the periods. ‘–name office' is optional and can be any name you choose.

or an alternative example with the tld:

or if you want to use the docker container with more than one Nextcloud (all hosts are separated by ‘ ' ):



Extra steps I found I needed for docker to communicate with the host os:

and copy the line DEFAULT_FORWARD_POLICY=”DROP” tweak it to look like this (commenting out the default, but leaving it there for future reference!):

You also have to edit /etc/ufw/sysctl.conf and remove the “#” at the start of the following lines, so they look like this:

Uncomment this to allow this host to route packets between interfaces

and finally restart the network stack and ufw on your server


Occasionally, new versions of this docker image are released with security and feature updates. Grab new docker image:

List docker images:

from the output you can glean the Container ID of your Collabora Online docker image. Stop and remove the Collabora Online docker image:

start the new image:

Install Docker On Ubuntu 16.04 Xenial

Install Docker On Ubuntu 16.04


Install Docker On Ubuntu Xenial

Allow document creating/editing capabilities in the Nextcloud Android app when using Nginx


Develop and scale your apps globally with DigitalOcean and/or Vultr – or use shared hosting with no server maintenance required at

Install Docker On Ubuntu 16.04 32 Bit

Installation & Maintenance

If you would like to get this app installed, maintained or need training, Contact Me to get current rates.