I have podman enabled like:
{
lib,
pkgs,
...
}: let
toml = pkgs.formats.toml {};
# containers storage settings.
# Use fuse-overlayfs instead of kernel overlay2.
storage-settings = {
storage = {
driver = "overlay";
options.overlay = {
mount_program = lib.getExe pkgs.fuse-overlayfs;
mountopt = "nodev,fsync=0";
force_mask = "shared";
};
};
};
in {
xdg.configFile."containers/storage.conf".source = toml.generate "storage.conf" storage-settings;
}
in homemanager
and in NixOS I enabled this:
# Podman ================================
virtualisation.podman = {
enable = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
# Auto prune podman resources.
autoPrune = {
dates = "weekly";
flags = ["--external"];
};
};
# Extent the user `uid/gid` ranges to make podman work better.
# This is for using https://gitlab.com/qontainers/pipglr
users.extraUsers.${config.settings.user.name} = {
subUidRanges = [
{
startUid = 100000;
count = 10000000; # 65539;
}
];
subGidRanges = [
{
startGid = 100000;
count = 10000000; # 65539;
}
];
};
I ran podman system reset
and did rm -rf ~/.local/share/containers
.
fuse-overlayfs
is enabled when I inspect podman info
.
When I run any image with a user, e.g. podman run --it --user podman quay.io/podman/stable:latest ls -alnd /home/podman
I see that the home folder as root=0
and not podman=1000
.
This happens with any image. Why is this? Its some misconfiguration of fuse-overlayfs
?
Note: I am only using fuse-overlayfs
to test out some nesting container stuff
Any help appreciated.