How to Manage Docker Containers with Rancher on UbuntuPosted about 2 years ago 1k
Rancher is an open source container management platform. It allows you to run and manage Docker and Kubernetes containers with ease. Rancher provides infrastructure services such as multi-host networking, load balancing, and volume snapshots.
In this tutorial, I will show you how to install and configure Rancher on Ubuntu 16.04 LTS. We will install Rancher on an Ubuntu server, enable local authentication, add the rancher host, and then try to run single container application from Rancher Dashboard.
- Ubuntu Server 16.04
- hakase-labs - 192.168.33.10
- rancher-host01 - 192.168.33.11
- Root privileges
What we will do?
- Install Docker on Ubuntu 16.04
- Install Rancher Server
- Enable Local Authentication Rancher Server
- Add New Host
- Deploy New Container
Step 1 - Install Docker on Ubuntu 16.04
Rancher can be installed as a set of Docker Containers - one container as a management server and another as an agent. And we need the Docker installed on all our rancher hosts.
Update your Ubuntu repository and upgrade all packages.
sudo apt update
sudo apt upgrade
Now install docker using the apt command below.
sudo apt install -y docker.io
After the installation is complete, start the docker service and enable it to run everytime at system boot.
systemctl start docker
systemctl enable docker
The Docker is now installed and running on our rancher host - check it using the command below.
systemctl status docker
And you should get the result as shown below.