Docker (not Podman) & Docker compose for Oracle Compute

With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects.
He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.
A blog for this? surely it's just the command below, right?
# Don't actually run this
# sudo dnf install docker
No, it doesn't. Because this command installs Oracle's flavour of Docker called podman-docker. Here is proof:

Podman might be fine for you, however, I had a problem where Podman containers could not resolve each other by container name. So instead of Podman, this blog is all about the installation of Docker-ce. Also known as Docker Community Edition & as a bonus we are going to get docker-compose running as an executable.
Docker compose is already supplied by Docker-ce as a plugin, but hey, I like the docker-compose command.
Install docker-ce
Add centos repository and install docker-ce
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo sudo dnf install docker-ce -yStart Docker
sudo systemctl start docker sudo systemctl enable dockerAllow docker to use reserved ports
sudo groupadd docker sudo service docker restart sudo usermod -a -G docker opcIMPORTANT: Exit the session and start a new session
exitCheck Docker version
docker --version
Install docker-compose
Run the following
sudo curl -L https://github.com/docker/compose/releases/download/v2.22.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose sudo chmod +x /usr/local/bin/docker-composeCheck Docker version
docker-compose --version
Test it out
Get a Hello World example running on port 80
docker run -P -d -p 80:80 --name hello_port_eighty nginxdemos/helloWait 5 seconds and then type
curl http://localhost:80 docker rm -f hello_port_eighty docker rmi nginxdemos/helloIf it worked, you should see the raw HTML from port 80. It looks a bit like this
<p><span>Server address:</span> <span>172.17.0.2:80</span></p> <p><span>Server name:</span> <span>71357de631fa</span></p> <p class="smaller"><span>Date:</span> <span>09/Oct/2023:16:28:20 +0000</span></p> <p class="smaller"><span>URI:</span> <span>/</span></p> </div> <div class="check"><input type="checkbox" id="check" onchange="changeCookie()"> Auto Refresh</div> <div id="footer"> <div id="center" align="center"> Request ID: c537f746356ac1ababdd362f2cea36c6<br/> © NGINX, Inc. 2018 </div> </div> </body> </html>
ENJOY!
What's the picture? It's the village of Ripley. Visit Yorkshire!






