LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 03-16-2024, 12:59 PM   #1
mpeterma
LQ Newbie
 
Registered: Aug 2023
Location: Germany - Saxony - Dresden - Ottendorf-Okrilla
Distribution: Slackware Linux / NetBSD
Posts: 6

Rep: Reputation: 4
Rootless podman on Slackware / Dependency on persistence of XDG_RUNTIME_DIR between sessions


Hello everyone,

I'm using Slackware 15 as a container runtime for Podman. I'm utilizing Podman with "rootless" containers, meaning processes run from the perspective of a standard user on the host. This setup works great so far, but I have a slight understanding issue.

The Podman command utilizes XDG_RUNTIME_DIR to persist runtime information about running containers. The directory is, for example, /run/user/1000. Here's what I do:

1. SSH login to the host
2. Start a container with Podman: podman start mycontainer
3. List running containers with: podman ps
4. Logout
5. SSH login again
6. List running containers again with: podman ps

As expected, step 3 shows the running containers, but step 6 does not. The cause appears to be that the contents of XDG_RUNTIME_DIR are cleared upon logout. It's worth noting that Slackware uses elogind. Can anyone confirm this and perhaps provide a tip on whether I can change this behavior?

Kind regards
Matthias
 
Old 03-17-2024, 12:36 AM   #2
mpeterma
LQ Newbie
 
Registered: Aug 2023
Location: Germany - Saxony - Dresden - Ottendorf-Okrilla
Distribution: Slackware Linux / NetBSD
Posts: 6

Original Poster
Rep: Reputation: 4
Good morning, after a good night's sleep and a new attempt at research, I have finally come up with a solution that I would like to share with you. I had already suspected that it had something to do with elogind. elogind is actually the extracted session management functionality from systemd. it therefore offers the same mechanisms and the same tools. i was able to make my desired change with "loginctl". "loginctl enable-linger <username>" ensures that the xdg_runtime_dir remains after a logout. This here helped me much: https://calinradoni.github.io/pages/...n-systemd.html

Kind regards
Matthias
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Rootless Podman and NFS LXer Syndicated Linux News 0 11-26-2019 01:48 AM
LXer: Running rootless Podman as a non-root user LXer Syndicated Linux News 0 10-09-2019 06:30 AM
LXer: Why can't rootless Podman pull my image? LXer Syndicated Linux News 0 09-12-2019 12:40 AM
LXer: How does rootless Podman work? LXer Syndicated Linux News 0 02-11-2019 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration