-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Current behavior
This simple compose file:
services:
proxy:
image: emilymclean/http-simple-proxy
environment:
- FORWARD_HOST=whoami
- FORWARD_PORT=2001
ports:
- "8080:80"
whoami:
image: traefik/whoami
command:
- --port=2001creates with podman-compose an extra network:
podman-compose up -d
tmp-compose_simple_proxy_1
tmp-compose_whoami_1
podman network ls
NETWORK ID NAME DRIVER
2f259bab93aa podman bridge
a3450c0cf286 tmp-compose_default bridge # the folder where the compose file is located is called tmp-compose
podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b2d061f5d34 docker.io/emilymclean/http-simple-proxy:latest nginx -g daemon o... 47 seconds ago Up 47 seconds 0.0.0.0:8080->80/tcp tmp-compose_simple_proxy_1
dced843f9f4c docker.io/traefik/whoami:latest --port=2001 47 seconds ago Up 47 seconds 80/tcp tmp-compose_whoami_1
podman inspect tmp-compose_simple_proxy_1 --format "{{.NetworkSettings.Networks}}"
map[tmp-compose_default:0xc000181b00]
podman inspect tmp-compose_whoami_1 --format "{{.NetworkSettings.Networks}}"
map[tmp-compose_default:0xc00026f9e0]Even there is no networks section in the compose file. This is the default behavior of Docker compose as far as I understand from https://docs.docker.com/reference/compose-file/networks/#the-default-network:
When a Compose file doesn't declare explicit networks, Compose uses an implicit
defaultnetwork. Services without an explicit networks declaration are connected by Compose to this defaultnetwork
Well the naming is different in podman-compose but should not matter.
Creating quadlets with podlet does not create any networks:
mkdir quadlet
podlet --file quadlet compose
Wrote to file: quadlet/simple_proxy.container
Wrote to file: quadlet/whoami.container
cat quadlet/*
[Container]
Environment=FORWARD_HOST=whoami FORWARD_PORT=2001
Image=emilymclean/http-simple-proxy
PublishPort=8080:80
[Container]
Exec='--port=2001'
Image=traefik/whoamiExpected behavior
I would expect that it also creates a network quadlet and links the 2 containers to it:
podlet --file quadlet compose
Wrote to file: quadlet/simple_proxy.container
Wrote to file: quadlet/whoami.container
Wrote to file: quadlet/fancy_network_name.network
cat quadlet/simple_proxy.container
[Unit]
After=fancy_network_name.network
Requires=fancy_network_name.network
[Container]
Environment=FORWARD_HOST=whoami FORWARD_PORT=2001
Image=emilymclean/http-simple-proxy
PublishPort=8080:80
Network=fancy_network_name
cat quadlet/whoami.container
[Unit]
After=fancy_network_name.network
Requires=fancy_network_name.network
[Container]
Exec='--port=2001'
Image=traefik/whoami
Network=fancy_network_name
cat quadlet/fancy_network_name.network
[Network]
NetworkName=fancy_network_nameVersion
Installed with cargo.
podlet --version
podlet 0.3.1
which podlet
~/.cargo/bin/podletReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels