top of page

Steps To Install Docker On Ubuntu 16.04 Server

  • Mohan Sekar
  • Nov 17, 2017
  • 2 min read

Installing Docker on Ubuntu 16.04 LTS

1. What to know before you install Docker on Ubuntu 16.04
Before you install Docker on Ubuntu 16.04, update the apt utility -- a package manager that includes the apt command -- and upgrade the server. If apt upgrades the kernel, you may need to reboot. If you need to reboot, do it when the server can be down for a brief period. It's important to note that you can only install Docker on 64-bit architecture, with a minimum kernel of 3.10.
To update and upgrade, enter the following commands:
sudo apt-get update
sudo apt-get upgrade
Once the update/upgrade is complete, you can install Docker with a single command:
sudo apt-get install -y docker.io
When the install completes, start the Docker engine with the command:
sudo systemctl start docker
Finally, enable Docker to run at boot with the command:
sudo system enable docker
2. Running Docker as a standard user
Out of the box, you can only use Docker if you're the root user, or by way of sudo. Since either running Docker as the root user or with sudo can be considered a security risk, it's crucial to enable a standard user. To do that, you must add the user to the Docker group. Let's say we're going to add the user "mohan" to the Docker group so that she can work with the tool. To do this, issue the following command:
sudo gpasswd -a mohan docker
Restart the Docker service with the command:
sudo systemctl restart docker
Once mohan logs out and logs back in again, she can use Docker.
Note:- To check your docker installation, use docker info command.

Comments


RECENT POSTS:
SEARCH BY TAGS:

© 2023 by NOMAD ON THE ROAD. Proudly created with Wix.com

  • b-facebook
  • Twitter Round
  • Instagram Black Round
bottom of page