How to put in podman-compose on AlmaLinux and hold utilizing your docker-compose.yml manifests

If you’ve got constructed scores of docker-compose.yml information and are migrating to AlmaLinux, you may want to put in the podman-compose software so you’ll be able to hold utilizing these information. Jack Wallen reveals you the way.

Image: fatmawati/Adobe Stock

Out of the field, AlmaLinux ships with the Docker alternative, Podman. That’s nice, as a result of Podman is, for probably the most half, a drop-in alternative for Docker. However, one factor that the default Podman set up doesn’t have is docker-compose, and lots of container admins are accustomed to utilizing docker-compose to deploy apps and providers. If you’ve spent weeks, months and years crafting these docker-compose information, you don’t wish to need to allow them to go.

Fortunately, as of model 3 of Podman, there’s an equal – podman-compose – and it’s backwards suitable with all these Docker compose information you’ve created. However, that software isn’t put in by default, and to make issues extra difficult, the method of putting in podman-compose is kind of totally different.

SEE: 40+ open supply and Linux phrases you could know (TechRepublic Premium)

I’m going to stroll you thru getting podman-compose put in on each AlmaLinux 8 and 9. Understand that AlmaLinux 9 continues to be in beta, so likelihood is slim you’re utilizing that in your container deployments. However, as soon as AlmaLinux 9 arrives, you’ll most likely be migrating to the most recent launch. When that comes, there’s no assure the podman-compose utility might be in the usual repositories. Because of that, we’ve got to show to pip.

With that stated, let me present you how one can set up podman-compose on each AlmaLinux 8 and 9.

What you’ll want to begin

The solely requirement is a working occasion of both AlmaLinux 8 or 9 and a consumer with sudo privileges. Let’s get to work.

How to put in podman-compose on AlmaLinux 8

This course of is kind of easy. Just log into your AlmaLinux 8 occasion and difficulty the command:

sudo dnf set up podman-compose -y

Once the set up is full, you’ll be able to confirm it with the command:

podman-compose -h

You ought to see the assistance contents listed. That’s it: You’re carried out.

How to put in podman-compose on AlmaLinux 9

This is the place it will get a bit extra difficult, as podman-compose isn’t discovered within the AlmaLinux 9 repositories. With AlmaLinux 9, putting in podman-compose is all about Python.

First, set up Python3 and Pip with:

sudo dnf set up python3 python3-pip python3-devel -y

Upgrade pip:

sudo -H pip3 set up --upgrade pip

Next, we have to set up the Python dotenv module with the command:

sudo pip3 set up python-dotenv

Now, we will set up pyyaml:

sudo pip3 set up pyyaml

Finally, we will set up podman-compose with pip, utilizing the command:

sudo pip3 set up podman-compose

Once this set up completes, difficulty the command:

podman-compose -h

You ought to once more see the assistance contents for podman-compose.

If Python and Pip fail you, there’s one other technique that also needs to work. You can obtain the podman-compose binary and put it aside to /usr/native/bin/ with the command:

sudo curl -o /usr/native/bin/podman-compose

Once that file has been downloaded, give it the right permissions with:

sudo chmod u+x /usr/native/bin/podman-compose

Again, run the command podman-compose -h

If the assistance info seems, all is prepared.

Congratulations, podman-compose is put in on AlmaLinux. You ought to now be capable to use all of these docker-compose.yml information with the command:

podman-compose up

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the most recent tech recommendation for enterprise professionals from Jack Wallen.

Source hyperlink

Leave a Reply

Your email address will not be published.