Turns out it's not that easy to install Docker CE in RHEL 8 just yet. Well, maybe there's no immediate need since RHEL 8 comes with its own containerization stack based on podman?
Hello, World in podman
podman provides comprehensive compatibility with docker command, most non-Docker specific options are supported.
If you are familiar with docker command syntax, give it a try by just replacing docker with podman command.
Let's do the hello world exercise:
greys@redhat:~ $ podman run hello-world Trying to pull registry.redhat.io/hello-world:latest…Failed Trying to pull quay.io/hello-world:latest…Failed Trying to pull docker.io/hello-world:latest…Getting image source signatures Copying blob 1b930d010525: 977 B / 977 B [==================================] 0s Copying config fce289e99eb9: 1.47 KiB / 1.47 KiB [==========================] 0s Writing manifest to image destination Storing signatures Hello from Docker! This message shows that your installation appears to be working correctly.
To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/
As you can see, podman searches in Red Hat and Quay image repositories before moving on to Docker registry, but finally gets the hello-world image there.
Run Ubuntu image in podman
And if we want to follow Docker's advice and try running the Ubuntu Docker image, we'll replace
docker run -it ubuntu bash
with
podman run -it ubuntu bash
… It just works:
greys@redhat:~ $ podman run -it ubuntu bash Trying to pull registry.redhat.io/ubuntu:latest…Failed Trying to pull quay.io/ubuntu:latest…Failed Trying to pull docker.io/ubuntu:latest…Getting image source signatures Copying blob 5667fdb72017: 25.45 MiB / 25.45 MiB [==========================] 3s Copying blob d83811f270d5: 34.53 KiB / 34.53 KiB [==========================] 3s Copying blob ee671aafb583: 850 B / 850 B [==================================] 3s Copying blob 7fc152dfb3a6: 163 B / 163 B [==================================] 3s Copying config 2ca708c1c9cc: 3.33 KiB / 3.33 KiB [==========================] 0s Writing manifest to image destination Storing signatures root@686f0d85b4ad:/# uname -a Linux 686f0d85b4ad 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux root@686f0d85b4ad:/# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
I think it's pretty cool. Will definitely read up and post more about podman and containerization in Red Hat in the following weeks.
Leave a Reply