Linux command
apptainer-config 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Add fakeroot mapping
sudo apptainer config fakeroot --add [username]
Remove fakeroot mapping
sudo apptainer config fakeroot --remove [username]
Set a global configuration
sudo apptainer config global --set "[directive]" [value]
Get the current value
sudo apptainer config global --get "[directive]"
Reset a global directive
sudo apptainer config global --reset "[directive]"
Preview changes
sudo apptainer config global --dry-run --set "[directive]" [value]
说明
apptainer config manages configuration for the Apptainer container platform. It provides administrative commands for managing fakeroot user mappings and editing the global apptainer.conf configuration file from the command line. Most operations require root privileges or an unprivileged installation. The command operates through two subcommands: fakeroot for managing user namespace mappings that allow unprivileged users to build and run containers with apparent root access, and global for modifying system-wide configuration directives that control container behavior, bind paths, security settings, and resource limits.
参数
- -a, --add
- Add a fakeroot mapping entry for a user (fakeroot subcommand)
- -r, --remove
- Remove a fakeroot mapping entry for a user (fakeroot subcommand)
- -e, --enable
- Enable an existing fakeroot mapping entry (fakeroot subcommand)
- -d, --disable
- Disable an existing fakeroot mapping entry (fakeroot subcommand)
- --set
- Set a configuration directive value (global subcommand)
- --unset
- Remove a value from a configuration directive (global subcommand)
- --get
- Retrieve the current value of a configuration directive (global subcommand)
- --reset
- Reset a configuration directive to its default value (global subcommand)
- --dry-run
- Display the resulting configuration without writing to file (global subcommand)
- -h, --help
- Display help for the config command
FAQ
What is the apptainer-config command used for?
apptainer config manages configuration for the Apptainer container platform. It provides administrative commands for managing fakeroot user mappings and editing the global apptainer.conf configuration file from the command line. Most operations require root privileges or an unprivileged installation. The command operates through two subcommands: fakeroot for managing user namespace mappings that allow unprivileged users to build and run containers with apparent root access, and global for modifying system-wide configuration directives that control container behavior, bind paths, security settings, and resource limits.
How do I run a basic apptainer-config example?
Run `sudo apptainer config fakeroot --add [username]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --add do in apptainer-config?
Add a fakeroot mapping entry for a user (fakeroot subcommand)