containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
4.86k stars 465 forks source link

How to install podman-compose in an air-gapped network? #924

Closed DaleBinghamSoteriaSoft closed 1 week ago

DaleBinghamSoteriaSoft commented 2 months ago

The question I have : What is the best way to install podman-compose into an air gapped (no outside Internet) network? If this is in a lab, a secure environment, or some other machine or network that has no way to run pip install podman-compose?

I do not see a way to do that from this site or podman.io. I have searched for this from other folks/articles and came up empty. Short of "install on a networked machine, make an image, push to your air-gapped network" I cannot find or think of one. And that is not an easy upgrade path when it changes.

Or do we wait for podman 5.x with podman compose built in?

p12tic commented 2 months ago

You can simply copy podman_compose.py file and call it directly. You will need pyyaml and dotnev installed. On Debian-based distributions these are in python3-dotnev and python3-yaml packages.

p12tic commented 2 months ago

By the way, podman compose will just call docker-compose or podman-compose, whichever is installed. So if you choose podman-compose it still needs to be installed.

DaleBinghamSoteriaSoft commented 2 months ago

Ok thank you @p12tic this is on REL 8.x box but air-gapped.

So either do the podman_compose.py with the extra packages. OR install the docker-compose binary and then call podman compose.

We have pulled the latest from the RPM but 8.8 only pulls podman 4.6.1 I believe currently. We have to try podman 5 as well.

We will try this and see what we get. I appreciate it.

apeteri commented 4 weeks ago

@DaleBinghamSoteriaSoft You might want to download and install .whl files (wheels, ie. binary distributions) from PyPI then:

Installing these by hand would be more or less equivalent to using the pip install method.

muayyad-alsadi commented 4 weeks ago

You can download the tarball

curl -sSLO https://github.com/containers/podman-compose/archive/main.tar.gz

You can pick any version or tag instead of main.

pip3 install file.tar.gz

But as others said it's a single file script you can just put the file in bin and chmod +x

DaleBinghamSoteriaSoft commented 4 weeks ago

Thank you both for that information. I will try those.

p12tic commented 1 week ago

There have been a number of suggestions, so it makes sense to close the issue. Please reopen if none of the suggestions work.