File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,16 @@ I prefer using Podman as it doesn’t require a daemon with root permissions.
93
93
94
94
``` sh
95
95
apt install podman
96
+
96
97
# start app1 at port 8000 as config in nginx, and with inner port 8888
97
- podman run --rm -p 8000:8888 ghcr.io/app1container:latest
98
+ # the container automatically restarts if it crashes somehow
99
+ podman run --name app1 --restart always -p 8000:8888 ghcr.io/app1container:latest
100
+
101
+ # create a systemd service to be able to restart also on machine reboot
102
+ podman generate systemd -name app1 --restart-policy=always > ~ /.config/systemd/user/app1
103
+ systemctl --user enable app1
104
+
105
+ # Ensure lingering is enabled for user services so it starts on boot,
106
+ # otherwise it will wait for the user ssh connection
107
+ loginctl enable-linger $( whoami)
98
108
```
You can’t perform that action at this time.
0 commit comments