Running containers with podman and systemd #915
Closed
ikke-t
started this conversation in
Show and tell
Replies: 1 comment
-
|
I close now this thread as there is now enhanced image and no port trickery is needed. There is up to date instructions in container examples: https://github.com/LibreBooking/docker/tree/master/.examples/podman |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
as I haven't used docker in years I configured Librebooking provided container under podman. Podman is open source container tool which was released years ago, and has been used for years already to go past docker.
I also configured it to be used with quadlets, the files that describe pods/containers to systemd. See more options here.
This is a simple example to implement what development examples have at docker documentation for LB. For further configuration see the above systemd file format for help. Like using secrets etc. For any librebooking options, just follow the normal guides.
Since I run this with user, not root, and the container user is not root, we need to use high ports. The offered docker file is using low port for apache (80), we need to replace apache config to use higher ports (8080). That's a little extra here.
So that said, let's go:
Create network file:
create volume for DB
Create DB container conf
Create Images Volume
Create Reservations Volume
Create LB container file
Create ports.conf to override apache port
Create virtual server conf to override apache port
Create permanent conf dir for LB
mkdir ~/librebooking-confStart the services
Now we have all the config files done for systemd. Next we reload the daemon, and start the services:
If you want to see the logs, you can use
podman logs ...or usejournalctl --user -u lb. You can also modify the conf file in ~/librebooking-conf/config.php, and restart the service withsystemctl --user restart lb.Connect to Librebooking
At this point the system is running at http::8080.
Alternatively using just podman
You could just quickly also just run plain podman, but remember this is not persistent:
Have fun with LB in podman!
I did the config on Fedora 43.
Beta Was this translation helpful? Give feedback.
All reactions