Byte Ebi's Logo

Byte Ebi 🍀

A Bit everyday A Byte every week

Enable docker service in remote server

Introduction to enabling Docker service on cloud hosts

Ray

Step-by-step guide for enabling Docker and Docker-compose services on a new cloud host.

Installing Docker

sudo apt-get install docker.io
sudo apt install docker.io

Adding Users to Group

This step allows users to execute Docker commands without sudo, it is optional.

sudo groupadd docker                   # Ensure that the docker user group exists

sudo usermod -a -G docker $USER        # Add the current user to the docker group

# Or
sudo usermod -a -G docker user_name   # Add user account "user_name" to the group, useful when dealing with multiple users

After completing this step, remember to log in again to the remote host.

ref: Ubuntu Linux Docker Installation Steps and Tutorial

Some users choose to directly add users to the sudoer group with the same result.

Installing docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

ref: Install Docker Compose


With these steps, Docker container operations can be performed on the newly provisioned cloud host.

Recent Posts

Categories

Tags