Skip to content
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

docs: add podman auto-start info and cleanup structure #200

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

alangrainger
Copy link
Contributor

- Add documentation for how to automatically start containers on system boot (refer to ublue-os#188).
- Re-arrange the Podman sections so they are together under a **Podman** heading.
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels Sep 6, 2024
@alangrainger
Copy link
Contributor Author

alangrainger commented Sep 6, 2024

@bsherman I don't know how to edit a pushed commit per your request here, so I just deleted the whole repo and started again.

This is the new PR.

@alangrainger
Copy link
Contributor Author

@bsherman any update?

Copy link
Collaborator

@bsherman bsherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my delay! I was distracted, obviously.

I like the cleanup, and the new addition with one minor request.

cp /lib/systemd/system/podman-restart.service /var/home/core/.config/systemd/user

# Enable the user service
systemctl --user enable podman-restart.service
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either before or after describing this for user run podman, could you also add the global?

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, what do you mean? What is "the global"?

The system (non-user) podman-restart service doesn't do anything useful whether it is enabled or disabled.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, by global, i mean system... podman-restart does the same thing for system as it does for users... but for starting restart: always rootful podman containers.

Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I must be missing something. Podman should never be rootful, no? It should always be running under the core user - isn't that the whole purpose of running rootless Podman instead of Docker?

Since all containers on UCore run rootless under the core user, there should be no need to describe Fedora's podman-restart system service?

Regardless, the system service already exists and needs nothing done to it. People can already immediately enable that should they need it, but I can't see why they would need it.

Copy link
Collaborator

@bsherman bsherman Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podman runs rootful just fine.

Making decisions about "what is right, rootless or rootful" is not something I want to get into. People can use a system how they want.
I know several users delete the core user and create other users via ignition and also many run rootful podman containers.

All I'm asking for is to add, "if you want to run your rootful podman containers to autostart, just run this command."

Copy link
Contributor Author

@alangrainger alangrainger Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I will do. I'm not being argumentative - I literally only started using Podman and Docker when I started using Aurora, and it's all brand new to me. I have zero clue what is the right way to do things.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I will do. I'm not being argumentative

No worries! I think your suggestion is very helpful, as clearly it's not always easy to find something that seems like it should be obvious (especially when more momentum of documentation seems to be around docker and docker-compose).

I just think your suggestion applies equally well to both root/user podman operation. :-)

I literally only started using Podman and Docker when I started using Aurora, and it's all brand new to me. I have zero clue what is the right way to do things.

You have much more than zero clue! You are correct in your belief that many advocate for "only run podman as user", but that's not because podman itself is less secure than anything else, it's just to encourage more secure practices. So if you can and are willing to run all rootless, excellent!

And again, I thank you for your contribution.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 18, 2024
@bsherman bsherman merged commit 1a61c50 into ublue-os:main Sep 18, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants