Closed XenGi closed 2 years ago
PublishPort lines in the container file don't get properly translated for IPv6 sockets.
PublishPort
This container file:
[Unit] Description=test container [Container] Image=httpd:latest PublishPort=80:80 PublishPort=[::]:80:80 [Service] Restart=always [Install] WantedBy=multi-user.target default.target
Should result in this service file:
# Automatically generated by quadlet-generator [Unit] Description=test container RequiresMountsFor=%t/containers SourcePath=/etc/containers/systemd/test.container [X-Container] Image=docker.io/httpd:latest PublishPort=80:80 PublishPort=[::]:80:80 [Service] Restart=always Environment=PODMAN_SYSTEMD_UNIT=%n KillMode=mixed ExecStartPre=-rm -f %t/%N.cid ExecStopPost=-/usr/bin/podman rm -f -i --cidfile=%t/%N.cid ExecStopPost=-rm -f %t/%N.cid Delegate=yes Type=notify NotifyAccess=all SyslogIdentifier=%N ExecStart=/usr/bin/podman run --name=systemd-%N --cidfile=%t/%N.cid --replace --rm -d --log-driver journald --pull=never --runtime /usr/bin/crun --cgroups=split --init --sdnotify=conmon --security-opt=no-new-privileges --cap-drop=all --mount type=tmpfs,tmpfs-size=512M,destination=/tmp --uidmap 0:0:1 --uidmap 1:1879048192:65536 --gidmap 0:0:1 --gidmap 1:1879048192:65536 -p=80:80 -p=[::]:80:80 docker.io/httpd:latest [Install] WantedBy=multi-user.target default.target
The -p80:80 ends up there but not the -p[::]:80:80. I guess it's a parsing error when the conversion from .container to .service file happens.
-p80:80
-p[::]:80:80
.container
.service
The pull request is done and fixes this problem. Works like a charm on my end.
PublishPort
lines in the container file don't get properly translated for IPv6 sockets.This container file:
Should result in this service file:
The
-p80:80
ends up there but not the-p[::]:80:80
. I guess it's a parsing error when the conversion from.container
to.service
file happens.