-
Notifications
You must be signed in to change notification settings - Fork 494
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
Restart Policy not set #91
Comments
Ok. I'll try to do that this week end |
@muayyad-alsadi Any news?) |
@DesSolo |
Not true, Podman has included restart policies for some time (I think we added it in the 1.4.x releases?) |
@mheon |
@muayyad-alsadi |
Any updates on this? Is this still worked on? |
Does "restart: always" work well with podman-compose now? |
Any update? |
this seems to be fixed here, but it's podman not respecting as @bilal-ameer-ivolve mensioned |
Any news on this? Would be great :) |
For the record I ran into this issue too. After switching from v0.1.5 to devel@HEAD the restart policy works as intended. Do you have any plan to release another v0.x version? |
Running podman-compose version 1.0.3 from pypi I still have this issue. in a docker-compose.yml file, the flag |
@EzeKoren here is a buysbox services:
web:
image: busybox
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8000"]
restart: always
as you can see it's passed would you please share the output from your side (do down and up) |
@muayyad-alsadi thank you for your reply. The container passed and it's executed normally after running I did manage to work around this issue by creating a systemd service using It could be useful to either implement this functionality on podman-compose itself or at least document this workaround |
this is quoted from podman manual page
I'm working on integrating
|
I'm relatively new to containers, Linux, etc. But from what I can see, A solution I can think of would be for podman-compose to detect a |
We definetly need a |
Podman-compose seems to respect the restart policy, but the podman doesn't - I needed to enable the service that is not enabled by default: |
I have a simpler solution, just use So, there has no need to install other stuff. |
Just for reference, this appears to be working fine for me, running: |
@stephenpmurray I cannot this fully.
Worksservices:
app:
restart: on-failure Passed down to the Doesn't Workservices:
app:
deploy:
restart_policy:
condition: on-failure Not passed down to the |
@Jack12816 Sorry it looks like I misunderstood what was being discussed in the thread. Yes,
was working for me Apologies for any confusion |
I suggest closing this. On Debian 12.1 with
containers with "restart: always" in docker-compose.yml will be restarted on reboot through
|
Using Ubuntu 24.04, I have enabled:
and marked each of my containers in the
Starting up the containers as a regular (non-sudo) user works fine:
And the restart service is running:
After rebooting the system, the containers do not come up automatically. However, when I manually I also tried this:
(so without the That is workable for manual upgrades/maintenance, but is obviously not helpful to recover from power failures etc. Does restart not work for sudo-less regular user accounts? Edit: I learned that the following will open a user session after reboot:
The above command fixed my problem. Rebooting the server will automatically spin up the containers under my regular user account. |
when I use podman-compose to up my pods, restart policy is not set, while in docker-compose it sets restart policy.
Output of docker inspect (Up by docker-compose)
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
while there is no key RestartPolicy when up by podman-compose in podman inspect
The text was updated successfully, but these errors were encountered: