podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

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

Open DaleBinghamSoteriaSoft opened this issue 1 year ago • 3 comments

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?

DaleBinghamSoteriaSoft avatar May 03 '24 11:05 DaleBinghamSoteriaSoft

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 avatar May 04 '24 14:05 p12tic

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.

p12tic avatar May 04 '24 14:05 p12tic

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.

DaleBinghamSoteriaSoft avatar May 04 '24 14:05 DaleBinghamSoteriaSoft

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

  • https://pypi.org/project/python-dotenv/#files
  • https://pypi.org/project/podman-compose/#files
  • IIRC PyYAML is already included in not-the-absolute-smallest package selection of RHEL as package python3-pyyaml

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

apeteri avatar Jun 10 '24 08:06 apeteri

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

muayyad-alsadi avatar Jun 10 '24 09:06 muayyad-alsadi

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

DaleBinghamSoteriaSoft avatar Jun 10 '24 10:06 DaleBinghamSoteriaSoft

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

p12tic avatar Jun 26 '24 16:06 p12tic