containers / containers/podlet

[Windows] Error parsing volume source: invalid start character `/`; AND Error: volume container path is not absolute

Open
#99 4 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
Rust
Stars
1.6k
Forks
48
Avg merge
1d 9h
Merged PRs (30d)
1

Description

The "volumes" field is not being parsed properly in v0.3.0 (v0.2.4 is ok).

(1) Error parsing volume source: invalid start character `/`:
```sh
$ cat <<'EOF' >docker-compose.yml
version: '3'
services:
busybox-test:
image: busybox
command: ["ash", "-c", "while true; do echo Hello; sleep 2; done"]
volumes:
- /var/run:/var/run
EOF

$ podlet --version
podlet 0.3.0

$ podlet compose docker-compose.yml
Error:
0: error converting compose file
1: error reading compose file
2: File `docker-compose.yml` is not a valid compose file
3: services.busybox-test.volumes[0]: error parsing volume source: error parsing volume identifier: invalid start character `/`, identifiers must start with an ASCII letter (a-z, A-Z) or digit (0-9) at line 7 column 9
Location:
src\cli\compose.rs:203
```

(2) Error: volume container path ... is not absolute
```
$ podlet --version
podlet 0.3.0

$ podlet compose compose-example.yaml
Error:
0: error converting compose file
1: error reading compose file
2: File `compose-example.yaml` is not a valid compose file
3: services.caddy.volumes[0]: volume container path `/etc/caddy/Caddyfile` is not absolute at line 9 column 9
Location:
src\cli\compose.rs:203
```

Your [compose-example.yaml](https://github.com/containers/podlet/blob/main/compose-example.yaml) also appears to be broken since it starts with `name: caddy`.

Both tests run fine in v0.2.4, after removing that first line in [compose-example.yaml](https://github.com/containers/podlet/blob/main/compose-example.yaml).

Thank you for podlet! I am new to quadlets and your tool helps me learn the basic conversion. :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.