-
I'm facing the same issue that was discussed in #19838. I'm starting a rootless container with generated service using Podman Quadlet, the container definition file is created under I'm able to do My files looks like the below (I tried to give the volume name and it failed prevsiouly, so I kept it without a name and used the inferred names:
Referring to the selected answer in #19838, I ran this command and in the output it looks like it's not scanning my user files and only the global system paths for Quadlet files? Is there something I'm missing to have it generate from my user files as well? $ /usr/libexec/podman/quadlet --dryrun
quadlet-generator[3905292]: No files parsed from [/run/containers/systemd /etc/containers/systemd /usr/share/containers/systemd] Podman version:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Since you're running a rootless Quadlet, you need to tell that to the dryrun command as well. Please run:
If you need help understanding the output, please paste all the unit files and the output of the dryryn. |
Beta Was this translation helpful? Give feedback.
-
Thank you @ygalblum, I missed the For anyone visiting the issue, below what worked for me, definition files under my user directory # ~/.config/containers/systemd/backend-app.network
[Network]
# ~/.config/containers/systemd/backend-app.volume
[Volume]
# ~/.config/containers/systemd/backend-app.container
[Unit]
Description=My Backend Application Container
Requires=backend-app.network backend-app.volume
After=network-pre.target backend-app.network backend-app.volume
[Container]
ContainerName=backend-app
Image=docker.io/a7md0/myapp:latest
PublishPort=8080:80/tcp
PublishPort=8443:443/tcp
# When referring to the actual name of the network/volume they start with `systemd` prefix
Network=systemd-backend-app
Volume=systemd-backend-app:/app/storage:rw,z
AddCapability=NET_BIND_SERVICE
[Service]
Restart=always
[Install]
WantedBy=multi-user.target default.target Then I had to start the network, volume and container like the below (different naming than what I refer from the container) systemctl --user start backend-app-network
systemctl --user start backend-app-volume
systemctl --user start backend-app The actual names of the network/volume $ podman network list
NETWORK ID NAME DRIVER
2f259bab93aa podman bridge
11c4b7565c25 systemd-backend-app bridge
$ podman volume list
DRIVER VOLUME NAME
local systemd-backend-app |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm not sure which Podman version you are using, but the support for translating dependencies set in the Having said that, in your case, the correct way is changing the names of the network and volume in the So, the
I comment, I'm not sure if this: |
Beta Was this translation helpful? Give feedback.
-
I'm actually using Podman 5.4.0, but setting the Volume and Network to the file name worked for me. Only that I still have to manually start the network/volume services, I'll retest this on 5.5.X once it's available on my distro As for the |
Beta Was this translation helpful? Give feedback.
Hi,
I'm not sure which Podman version you are using, but the support for translating dependencies set in the
Unit
section was only added in v5.5.X.Having said that, in your case, the correct way is changing the names of the network and volume in the
.container
unit to the corresponding.network
and.volume
units. Once set, Quadlet will handle the translation and adding the dependencies.So, the
.container
should be: