containers / podlet

Generate Podman Quadlet files from a Podman command, compose file, or existing object
https://crates.io/crates/podlet
Mozilla Public License 2.0
322 stars 10 forks source link

podlet-compose: cannot mix long syntax and short syntax volume declaration #26

Closed cyqsimon closed 7 months ago

cyqsimon commented 7 months ago

TLDR

If you declare some volumes using the short syntax and some others using the long syntax, the ones using the long syntax will fail parsing. I believe this to be an upstream problem in serde_yaml.

Using Frigate as an example:

version: "3.9"
services:
  frigate:
    image: ghcr.io/blakeblackshear/frigate:stable
    volumes:
      - type: tmpfs
        target: /tmp/cache
      - /etc/frigate/config.yml:/config/config.yml
$ podlet compose frigate.yaml
Error:
   0: File `frigate.yaml` is not a valid compose file
   1: services.frigate: data did not match any variant of untagged enum Volumes at line 4 column 5

Location:
   src/cli.rs:543

I have already reported it upstream to stephanbuys/docker-compose-types#31. This issue is just to notify the author(s) and other users of podlet. For more details, see that issue.

cyqsimon commented 7 months ago

The author of docker-compose-types responded very expediently and fixed it. Turns out it's just an implementation issue. Just need to bump to v0.6.1 and this should be fixed.