-->
  • Recent Articles

    How to Install Podman on Oracle Linux 7 (OL7)

     

    podman
    Podman
     

    Oracle Linux 7 (OL 7) does not includes Podman by default. On this article I'll describe how to install Podman on Oracle Linux 7. 

    Install Podman

    The installation of Podman is really simple.

    1. Add the Repositories

    [root@podman root]# yum install oracle-softwarecollection-release-el7


    2. Install Yum utils and Enable OL7 addon repository.

    [root@podman root]#yum install yum-utils -y
    [root@podman root]#yum-config-manager --enable ol7_addons
    
    yum_repos_forpodman_ol7
    yum_repos_forpodman_ol7

    3. Install podman
    [root@podman root]#yum install podman -y
    [root@podman root]# yum install slirp4netns -y
    [root@podman root]#yum install podman -y
    Loaded plugins: langpacks, ulninfo
    ol7_addons                                                                                                                                                                            | 3.0 kB  00:00:00
    ol7_latest                                                                                                                                                                            | 3.6 kB  00:00:00
    ol7_optional_latest                                                                                                                                                                   | 3.0 kB  00:00:00
    Resolving Dependencies
    --> Running transaction check
    ---> Package podman.x86_64 0:1.6.4-29.0.1.el7_9 will be installed
    --> Processing Dependency: containernetworking-plugins >= 0.8.1-1 for package: podman-1.6.4-29.0.1.el7_9.x86_64
    --> Processing Dependency: containers-common >= 0.1.29-3 for package: podman-1.6.4-29.0.1.el7_9.x86_64
    --> Processing Dependency: slirp4netns >= 0.4.0-1 for package: podman-1.6.4-29.0.1.el7_9.x86_64
    --> Processing Dependency: conmon for package: podman-1.6.4-29.0.1.el7_9.x86_64
    --> Processing Dependency: fuse-overlayfs for package: podman-1.6.4-29.0.1.el7_9.x86_64
    --> Processing Dependency: nftables for package: podman-1.6.4-29.0.1.el7_9.x86_64
    --> Running transaction check
    ---> Package conmon.x86_64 3:2.0.26-2.el7 will be installed
    ---> Package containernetworking-plugins.x86_64 0:0.8.3-3.el7_8 will be installed
    ---> Package containers-common.x86_64 1:0.1.40-12.0.1.el7_9 will be installed
    ---> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed
    --> Processing Dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
    --> Processing Dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
    --> Processing Dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
    ---> Package nftables.x86_64 1:0.8-14.el7 will be installed
    --> Processing Dependency: libnftnl.so.7(LIBNFTNL_5)(64bit) for package: 1:nftables-0.8-14.el7.x86_64
    --> Processing Dependency: libnftnl.so.7()(64bit) for package: 1:nftables-0.8-14.el7.x86_64
    ---> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed
    --> Running transaction check
    ---> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed
    ---> Package libnftnl.x86_64 0:1.0.8-3.el7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================================================================================================================================
     Package                                                    Arch                                  Version                                              Repository                                       Size
    =============================================================================================================================================================================================================
    Installing:
     podman                                                     x86_64                                1.6.4-29.0.1.el7_9                                   ol7_developer                                    13 M
    Installing for dependencies:
     conmon                                                     x86_64                                3:2.0.26-2.el7                                       ol7_oci_included                                 36 k
     containernetworking-plugins                                x86_64                                0.8.3-3.el7_8                                        ol7_developer                                    20 M
     containers-common                                          x86_64                                1:0.1.40-12.0.1.el7_9                                ol7_developer                                    43 k
     fuse-overlayfs                                             x86_64                                0.7.2-6.el7_8                                        ol7_developer                                    54 k
     fuse3-libs                                                 x86_64                                3.6.1-4.el7                                          ol7_developer                                    81 k
     libnftnl                                                   x86_64                                1.0.8-3.el7                                          ol7_latest                                       77 k
     nftables                                                   x86_64                                1:0.8-14.el7                                         ol7_latest                                      185 k
     slirp4netns                                                x86_64                                0.4.3-4.el7_8                                        ol7_developer                                    81 k
    
    4. Check Podman Version
    [root@podman root]#podman --version
    podman version 1.6.4
    [root@podman root]#
    Podman syntax is similar to Docker, If you want create the docker alias to run podman commands, then install following package.

    yum install -y podman-docker
    [root@podman ~]# yum install  podman-docker
    Loaded plugins: langpacks, ulninfo
    Resolving Dependencies
    --> Running transaction check
    ---> Package podman-docker.noarch 0:1.6.4-29.0.1.el7_9 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================================================================================================================================
     Package                                           Arch                                       Version                                                Repository                                         Size
    =============================================================================================================================================================================================================
    Installing:
     podman-docker                                     noarch                                     1.6.4-29.0.1.el7_9                                     ol7_developer                                      31 k
    
    Transaction Summary
    =============================================================================================================================================================================================================
    Install  1 Package
    
    Total download size: 31 k
    Installed size: 5.9 k
    

    You may also want to install Buildah and Skopeo also.

    [root@podman root]#
    [root@podman root]#yum install -y buildah skopeo
    Loaded plugins: langpacks, ulninfo
    Resolving Dependencies
    --> Running transaction check
    ---> Package buildah.x86_64 0:1.11.6-12.0.1.el7_9 will be installed
    ---> Package skopeo.x86_64 1:0.1.40-12.0.1.el7_9 will be installed
    --> Processing Dependency: libostree-1.so.1(LIBOSTREE_2016.3)(64bit) for package: 1:skopeo-0.1.40-12.0.1.el7_9.x86_64
    --> Processing Dependency: libostree-1.so.1(LIBOSTREE_2016.8)(64bit) for package: 1:skopeo-0.1.40-12.0.1.el7_9.x86_64
    --> Processing Dependency: libostree-1.so.1()(64bit) for package: 1:skopeo-0.1.40-12.0.1.el7_9.x86_64
    --> Running transaction check
    ---> Package ostree.x86_64 0:2019.1-2.el7 will be installed
    --> Processing Dependency: libarchive.so.13()(64bit) for package: ostree-2019.1-2.el7.x86_64
    --> Running transaction check
    ---> Package libarchive.x86_64 0:3.1.2-14.el7_7 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =============================================================================================================================================================================================================
     Package                                        Arch                                       Version                                                   Repository                                         Size
    =============================================================================================================================================================================================================
    Installing:
     buildah                                        x86_64                                     1.11.6-12.0.1.el7_9                                       ol7_developer                                     8.8 M
     skopeo                                         x86_64                                     1:0.1.40-12.0.1.el7_9                                     ol7_developer                                     5.8 M
    Installing for dependencies:
     libarchive                                     x86_64                                     3.1.2-14.el7_7                                            ol7_latest                                        319 k
     ostree                                         x86_64                                     2019.1-2.el7                                              ol7_developer                                     513 k
    
    Transaction Summary
    =============================================================================================================================================================================================================
    Install  2 Packages (+2 Dependent packages)
    
    Total download size: 15 M
    Installed size: 61 M
    Downloading packages:
    (1/4): libarchive-3.1.2-14.el7_7.x86_64.rpm                                                                                                                                           | 319 kB  00:00:00
    (2/4): ostree-2019.1-2.el7.x86_64.rpm                                                                                                                                                 | 513 kB  00:00:00
    (3/4): buildah-1.11.6-12.0.1.el7_9.x86_64.rpm                                                                                                                                         | 8.8 MB  00:00:00
    (4/4): skopeo-0.1.40-12.0.1.el7_9.x86_64.rpm                                                                                                                                          | 5.8 MB  00:00:00
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                                                         23 MB/s |  15 MB  00:00:00
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : libarchive-3.1.2-14.el7_7.x86_64                                                                                                                                                          1/4
      Installing : ostree-2019.1-2.el7.x86_64                                                                                                                                                                2/4
      Installing : 1:skopeo-0.1.40-12.0.1.el7_9.x86_64                                                                                                                                                       3/4
      Installing : buildah-1.11.6-12.0.1.el7_9.x86_64                                                                                                                                                        4/4
      Verifying  : buildah-1.11.6-12.0.1.el7_9.x86_64                                                                                                                                                        1/4
      Verifying  : 1:skopeo-0.1.40-12.0.1.el7_9.x86_64                                                                                                                                                       2/4
      Verifying  : libarchive-3.1.2-14.el7_7.x86_64                                                                                                                                                          3/4
      Verifying  : ostree-2019.1-2.el7.x86_64                                                                                                                                                                4/4
    
    Installed:
      buildah.x86_64 0:1.11.6-12.0.1.el7_9                                                                  skopeo.x86_64 1:0.1.40-12.0.1.el7_9
    
    Dependency Installed:
      libarchive.x86_64 0:3.1.2-14.el7_7                                                                       ostree.x86_64 0:2019.1-2.el7
    
    Complete!
    [root@podman root]#
    
    

    Test

    Test the setup by running a "podman run hello-world" command.

    [root@podman root]#podman run hello-world
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    
    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
        (amd64)
     3. The Docker daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
        to your terminal.
    
    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/
    
    [root@podman root]#
    
    

    No comments