Giter Site home page Giter Site logo

Comments (6)

TomHutter avatar TomHutter commented on July 17, 2024 2

I have a similar issue on Ubuntu 20.04 with podman 2.0.6 and podman-compose 0.1.5

Traceback (most recent call last):
  File "/home/tom/.local/bin/podman-compose", line 8, in <module>
    sys.exit(main())
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 1095, in main
    podman_compose.run()
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 627, in run
    cmd(self, args)
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 784, in wrapped
    return func(*args, **kw)
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 899, in compose_up
    podman_args = container_to_args(compose, cnt,
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 459, in container_to_args
    mount_args = mount_desc_to_args(compose, volume, cnt['_service'], cnt['name'])
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 388, in mount_desc_to_args
    mount_desc = mount_dict_vol_to_bind(compose, fix_mount_dict(mount_desc, proj_name, srv_name))
  File "/home/tom/.local/lib/python3.8/site-packages/podman_compose.py", line 368, in mount_dict_vol_to_bind
    src = json.loads(out)[0]["mountPoint"]
KeyError: 'mountPoint'

The reason here lies in line 366 src = json.loads(out)[0]["mountPoint"] where podman-compose tries to get the volume mount point.

At least on my system podman inspect volume shows the mount point as Mountpoint. Changing line 366 in podman-compose to src = json.loads(out)[0]["Mountpoint"] solves the issue.

podman volume inspect blubb
[
     {
          "Name": "blubb",
          "Driver": "local",
          "Mountpoint": "/home/tom/.local/share/containers/storage/volumes/blubb/_data",
          "CreatedAt": "2020-09-10T08:26:28.01718523+02:00",
          "Labels": {
               
          },
          "Scope": "local",
          "Options": {
               
          },
          "UID": 0,
          "GID": 0,
          "Anonymous": false
     }
]

from podman-compose.

muayyad-alsadi avatar muayyad-alsadi commented on July 17, 2024

Try using devel branch as in README.md

from podman-compose.

 avatar commented on July 17, 2024

I have the same issue with devel and stable version. I installed with all methods, pip3, cp and so on... I got always the same issue. I understand the issue is not in podman-compose but in podman.

# podman volume inspect fess_esdata01
ERRO[0000] "unable to find volume fess_esdata01: volume with name fess_esdata01 not found: no such volume" 
null

[root@centos8 compose]# echo $?
0

podman volume inspect return 0 also when the command fails. So for podman-compose is impossible to understand if the volume exist, maybe is better use another method.
In centos8 there is the version:

# rpm -qi podman
Name        : podman
Version     : 1.0.5
Release     : 1.gitf604175.module_el8.0.0+194+ac560166
Architecture: x86_64
Install Date: Thu Oct 17 07:49:05 2019

from podman-compose.

rhatdan avatar rhatdan commented on July 17, 2024

You probably need a newer version of podman. Which should ship next month for rhel8.1.

from podman-compose.

 avatar commented on July 17, 2024

I tested on Fedora 30 and works (podman 1.6.1). It's an issue only with old versions of podman.

from podman-compose.

edeediong avatar edeediong commented on July 17, 2024

@TomHutter thanks a lot! This helped me... I'm using CentOS 8 and podman 2.1.1 with podman-compose 0.15. Thanks again

from podman-compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.