Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for external managed networks #95

Open
ZzenlD opened this issue Jul 19, 2024 · 1 comment
Open

Support for external managed networks #95

ZzenlD opened this issue Jul 19, 2024 · 1 comment

Comments

@ZzenlD
Copy link

ZzenlD commented Jul 19, 2024

I have the following docker-compose file:

version: "3.9"
services:
  traefik:
    image: docker.io/traefik:v3.0.3
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./traefik/etc:/etc/traefik:z
      - ./traefik/var/acme.json:/acme.json:z
    networks:
      - proxy
    restart: unless-stopped

networks:
  proxy:
    external:
      name: proxy

The command podman run --rm -v ./docker-compose.yml:/docker-compose.yml:Z ghcr.io/containers/podlet compose /docker-compose.yml fails with the following error message:

Error: 
   0: error converting compose file
   1: error reading compose file
   2: File `/docker-compose.yml` is not a valid compose file
   3: networks: invalid type: map, expected a boolean at line 22 column 3

Location:
   src/cli/compose.rs:203

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

If you remove external: name: proxy from the networks section, it works.

Would like it if external networks are supported, as this option is especially helpful with reverse proxies and multiple standalone docker-compose files for more clarity.

@k9withabone
Copy link
Member

From the Compose Specification, external should be set to true in your case and the name property used if you want to use an external network of a different name. However, if you do that you will get a different error as Podlet does not support using external networks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants