Learn How To Installing Docker CE on Ubuntu 16.04
Table of Contents
- Step 1: Updating all your software
- Step 2: Set up the repository
- Step 3: Install Docker CE
- Step 4: Create a user
- Step 5: Test Docker
- Step 6: Configure Docker to start on boot
- Next steps
If you are using a different system, please check our other tutorials.
Docker is an application that allows to deploy programs that are run as containers. It was written in the popular Go programming language. This tutorial explains how to install Docker CE on Ubuntu 16.04.
Step 1: Updating all your software
First off, let’s make sure that we are using a clean system. Run the apt updater.
apt-get update
Step 2: Set up the repository
Install packages to allow apt to use a repository over HTTPS
apt-get install apt-transport-https ca-certificates curl software-properties-common
Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
Use the following command to set up the stable repository.
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Step 3: Install Docker CE
apt-get update
apt-get install docker-ce
Step 4: Create a user
If you decide not to run Docker as the root user, you will need to create a non-root user.
Warning: The docker group grants privileges equivalent to the root user.
adduser user
usermod -aG docker user
Restart the Docker service.
systemctl restart docker
Step 5: Test Docker
Run the Docker hello-world container to test if the installation completed successfully.
docker run hello-world
You will see the following output.
Hello from Docker!
This message shows that your installation appears to be working correctly.
Step 6: Configure Docker to start on boot
Lastly, enable Docker to run when your system boots.
systemctl enable docker
Next steps
Congratulations!
https://www.itweb.services/tutorials/linux-guides/how-to-use-docker-creating-your-first-docker-container”>this guide where I explain how to create and use Docker containers.
Need help?
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!