Converting compose file fails with "invalid start character `~`" or "external networks (`proximity`) are not supported"
I wanted to convert a quite simple podman compose file:
---
name: searxng
services:
redis:
container_name: redis
image: docker.io/valkey/valkey:8-alpine
command: valkey-server --save 30 1 --loglevel warning
restart: unless-stopped
networks:
- searxng
volumes:
- ~/volumes/searxng/valkey-data2:/data
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
searxng:
container_name: searxng
image: docker.io/searxng/searxng:latest
restart: unless-stopped
security_opt:
- label:disable
networks:
- searxng
- proximity
expose:
- 8080
volumes:
- ~/volumes/searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
networks:
searxng:
proximity:
external: true
volumes:
valkey-data2:
podlet compose --pod gives me this error:
Error:
0: error converting compose file
1: error reading compose file
2: File `docker-compose.yaml` is not a valid compose file
3: services.redis.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 14 column 9
Location:
src/cli/compose.rs:203
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __libc_start_call_main<unknown>
at <unknown source file>:<unknown line>
2: __libc_start_main@GLIBC_2.2.5<unknown>
at <unknown source file>:<unknown line>
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
If I remove the trailing "~" just for testing, I get this error:
Error:
0: error converting compose file
1: error converting compose file into Quadlet files
2: external networks (`proximity`) are not supported
Location:
src/cli/compose.rs:384
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __libc_start_call_main<unknown>
at <unknown source file>:<unknown line>
2: __libc_start_main@GLIBC_2.2.5<unknown>
at <unknown source file>:<unknown line>
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
I guess the second error is related to #95 - I would be grateful if you would reconsider your position on external networks.
I also want to add that currently env variables in volumes are not supported. Like I want to allow certain container to access my entire home directory but it's not currently possible to do it with podlet, even though it's possible to do it with podman-compose.
Example:
services:
sync:
image: docker.io/syncthing/syncthing
volumes:
- $HOME:/home/deck
will throw:
Error:
0: error converting compose file
1: error reading compose file
2: File `docker-compose.yml` is not a valid compose file
3: services.sync.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 6 column 9
Location:
src/cli/compose.rs:203
@k9withabone could you give some insight why no support for external networks is planned, as you said in #95? I'm fully aware that this is likely some headache for you to implement.
Having an override to ignore unsupported options like these would be nice to allow to generate the rest of the quadlet file.