Dockerize an OCI Instance

paihari

Hari Bantwal

Posted on November 10, 2023

Dockerize an OCI Instance

"Docker undeniably stands as one of the most versatile tools in any engineer's toolkit. Its utility is akin to that of a Swiss army knife, and its constant evolution through community contributions only bolsters its strength.

Deploying software with Docker on your local machine has become a breeze lately, thanks to its seamless packaging. Familiarity with your local environment makes this a convenient choice. However, when the time comes to self-host an application on a cloud provider, the landscape becomes vastly different, and a multitude of challenges emerges.

In this blog post, we will delve into the installation of Docker on an Oracle Cloud Infrastructure (OCI) instance, laying the crucial foundation for our upcoming ventures. This article is part of an ongoing series, so stay tuned for more insights and practical tips.


Objective: Provision Docker Instance in OCI, with external Block volumes to cater to Docker Services


  1. Provision an OCI Instance. Refer OCI Instance with External Volume

  2. SSH to the Created Instance to install Docker and Docker Compose

sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf list docker-ce
sudo dnf install docker-ce --nobest
sudo docker -v
sudo systemctl enable --now docker
sudo systemctl status docker
sudo usermod -aG docker root
sudo systemctl disable firewalld
sudo sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo sudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
sudo docker-compose -v

Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
paihari
Hari Bantwal

Posted on November 10, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Dockerize an OCI Instance
oci Dockerize an OCI Instance

November 10, 2023