GithubHelp home page GithubHelp logo

podman-systemd/ about comments HOT 6 OPEN

tutorialworks avatar tutorialworks commented on August 12, 2024
podman-systemd/

from comments.

Comments (6)

rugk avatar rugk commented on August 12, 2024

The issue here is that if you add the service to /etc/systemd/system/ it will run on the system bus and as root, because podman generate systemd does not add a User= key to the systemd file.

This of course defeats a big purpose of podman, rootless containers.

I'm not quite sure how to best handle that…
You could add it as a user service to $HOME/.config/systemd/user, but that's also inconvenient as you need to start a new systemd session. It's possible, but maybe a simple User= in the service would be better,

from comments.

johnwmail avatar johnwmail commented on August 12, 2024

Hi @rugk, I add this to user systemd , but it does not start on boot, until the user logged in

from comments.

rugk avatar rugk commented on August 12, 2024

You can enable systemd user lingering AFAIK so that the user does not need to login. https://serverfault.com/q/846441/350103

from comments.

johnwmail avatar johnwmail commented on August 12, 2024

[johnw@cdn1b ~]$ loginctl list-users
UID USER
0 root
1000 johnw
30000 _podman

3 users listed.
[johnw@cdn1b ~]$ sudo loginctl enable-linger _podman
Could not enable linger: No such process

Anyway, I found the way to start it up on boot with cron.d, thanks.

[johnw@cdn1b ~]$ cat /etc/cron.d/podman

podman

@reboot _podman /usr/bin/podman start php-fpm &

from comments.

rugk avatar rugk commented on August 12, 2024

sudo loginctl enable-linger _podman
Could not enable linger: No such process

I guess you actually executed sudo loginctl enable linger _podman did not you? No space there, a hyphen… 🙃

from comments.

johnwmail avatar johnwmail commented on August 12, 2024

sudo loginctl enable-linger _podman
Could not enable linger: No such process

I guess you actually executed sudo loginctl enable linger _podman did not you? No space there, a hyphen… upside_down_face

No, I executed this
image

from comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.