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

Adding comments for container options in qm.container #678

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions qm.container
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,25 @@ LimitNOFILE=65536
TasksMax=50%

[Container]
# AddCapability
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would recommend here to use man quadlet also for details

Copy link
Author

Choose a reason for hiding this comment

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

Tried to copy some details from man quadlet, hope it's better now

Copy link
Collaborator

@Yarboa Yarboa Jan 14, 2025

Choose a reason for hiding this comment

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

Consider adding this link to upstream doc
https://docs.podman.io/en/v4.4/markdown/podman-systemd.unit.5.html#addcapability
for each Capability

Or that one, it is more accurate
man quadlet | awk '/AddCapability=$/,/^$/'

MHO it more accurate then copy paste content of changing description.
It could also be automated to check if parameters were changed,
I mean file parameters vs existence in manual

# -------------
# Add these capabilities, in addition to the default Podman capability set, to the container.
# If set to all, grants all capabilities to the container, increasing flexibility but significantly
# reducing security.
AddCapability=all
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above


# Unmask
# -------
# Specify the paths to unmask separated by a colon. unmask=ALL or /path/1:/path/2, or shell expanded paths (/proc/*):
# If set to ALL, Podman will unmask all the paths that are masked or made read-only by default.
Unmask=ALL
SecurityLabelNested=true
SeccompProfile=/usr/share/qm/seccomp.json

# PidsLimit
# ---------
# Disables the PID limit for the container by setting it to -1.
# Without a limit, the container can spawn unlimited processes, potentially exhausting system resources.
PidsLimit=-1

# Comment DropCapability this will allow FFI Tools to surpass their defaults.
Expand All @@ -49,7 +64,16 @@ AddDevice=-/dev/fuse
ContainerName=qm
Exec=/sbin/init
Network=private

# ReadOnly
# --------
# Makes the container's filesystem read-only, enhancing security by preventing modifications.
ReadOnly=true

# Rootfs
# ------
# Defines the root filesystem location for the QM container.
# By default the '${ROOTFS}' variable points to /usr/lib/qm/rootfs.
Rootfs=${ROOTFS}
Copy link
Collaborator

Choose a reason for hiding this comment

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

see previous one is it a container or partitioned filesystem?

Copy link
Author

Choose a reason for hiding this comment

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

Not sure what you mean here. Please check the changes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, I will try to explain there is a difference between running containerized podman and podman as part of file system
So in QM, container tools enables process isolation in the save filesystem and filesystem partition is isolated by disks

This i why it looks to me more logical to use disk instead of container
Consider using this
Defines the root filesystem location for QM partition.
instead
Defines the root filesystem location for the container.


SecurityLabelNested=true
Expand Down
Loading