Skip to content

Commit 4dac6b7

Browse files
committed
Add commands
1 parent dfd52fc commit 4dac6b7

10 files changed

Lines changed: 659 additions & 0 deletions
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# TAGLINE
2+
3+
Manage Linux capabilities for Apptainer container users and groups
4+
5+
# TLDR
6+
7+
**List capabilities** granted to a specific user
8+
9+
```sudo apptainer capability list --user [username]```
10+
11+
**Grant a capability** to a user
12+
13+
```sudo apptainer capability add --user [username] [CAP_NET_RAW]```
14+
15+
**Drop a capability** from a user
16+
17+
```sudo apptainer capability drop --user [username] [CAP_NET_RAW]```
18+
19+
**Grant all capabilities** to a group
20+
21+
```sudo apptainer capability add --group [groupname] all```
22+
23+
**List all available** Linux capabilities with descriptions
24+
25+
```apptainer capability avail```
26+
27+
**Drop all capabilities** from a user
28+
29+
```sudo apptainer capability drop --user [username] all```
30+
31+
# SYNOPSIS
32+
33+
**apptainer capability** _subcommand_ [_options_]
34+
35+
# DESCRIPTION
36+
37+
**apptainer capability** manages Linux capabilities granted to users and groups for use inside Apptainer containers. Administrators use this command to authorize specific users or groups to request particular capabilities at container runtime.
38+
39+
Capabilities are stored in a **capability.json** file maintained by Apptainer. Granting a capability does not automatically enable it inside containers — users must explicitly request granted capabilities at runtime using the **--add-caps** flag with commands like **apptainer exec** or **apptainer run**.
40+
41+
# SUBCOMMANDS
42+
43+
**add**
44+
> Grant one or more Linux capabilities to a user or group. Requires root.
45+
46+
**drop**
47+
> Revoke one or more Linux capabilities from a user or group. Requires root.
48+
49+
**list**
50+
> Display capabilities currently assigned to a user or group.
51+
52+
**avail**
53+
> Show all recognized Linux capabilities with brief descriptions.
54+
55+
# PARAMETERS
56+
57+
**--user** _name_
58+
> Target a specific user for add, drop, or list operations.
59+
60+
**--group** _name_
61+
> Target a specific group for add, drop, or list operations.
62+
63+
# CAVEATS
64+
65+
Granting Linux capabilities to users is usually equivalent to granting root-level access on the host system. Most capabilities allow users to break out of containers and escalate privileges. This feature is intended for trusted environments, not multi-tenant HPC clusters. Both **add** and **drop** accept the case-insensitive keyword **all** to operate on every available capability at once.
66+
67+
# SEE ALSO
68+
69+
[apptainer](/man/apptainer)(1), [apptainer-exec](/man/apptainer-exec)(1), [apptainer-run](/man/apptainer-run)(1), [capabilities](/man/capabilities)(7)

assets/commands/cfv.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# TAGLINE
2+
3+
Versatile checksum file verifier and creator
4+
5+
# TLDR
6+
7+
**Verify files** against a checksum file in the current directory
8+
9+
```cfv```
10+
11+
**Create an SFV** checksum file for all files in a directory
12+
13+
```cfv -C -t sfv -f [checksum.sfv] [path/to/directory/*]```
14+
15+
**Create an MD5** checksum file
16+
17+
```cfv -C -t md5 -f [checksum.md5] [path/to/files/*]```
18+
19+
**Create a SHA1** checksum file
20+
21+
```cfv -C -t sha1 -f [checksum.sha1] [path/to/files/*]```
22+
23+
**Verify and show status** for each file
24+
25+
```cfv -v [path/to/checksum.sfv]```
26+
27+
**Recursively verify** all checksum files in subdirectories
28+
29+
```cfv -r```
30+
31+
**Search for misnamed files** when verification fails
32+
33+
```cfv -s [path/to/checksum.sfv]```
34+
35+
# SYNOPSIS
36+
37+
**cfv** [**-T**|**-C**] [**-t** _type_] [**-f** _file_] [**-r**|**-rr**] [**-v**|**-V**] [**-n**|**-N**] [**-s**] [**-u**|**-uu**] [_files..._]
38+
39+
# PARAMETERS
40+
41+
**-C**
42+
> Create mode: generate a new checksum file.
43+
44+
**-T**
45+
> Test mode (default): verify files against a checksum file.
46+
47+
**-t** _type_
48+
> Checksum type: **sfv**, **md5**, **bsdmd5**, **sha1**, **sha256**, **sha512**, **csv**, **csv2**, **csv4**, **par**, **par2**, **torrent**.
49+
50+
**-f** _file_
51+
> Specify the checksum file to read or write.
52+
53+
**-r**
54+
> Recurse into directories. Use **-rr** to recurse into both files and checksum files.
55+
56+
**-v**
57+
> Verbose: print status for every file, not just errors.
58+
59+
**-V**
60+
> Disable verbose output.
61+
62+
**-n**
63+
> Rename files with bad checksums to filename.bad.
64+
65+
**-N**
66+
> Disable renaming.
67+
68+
**-s**
69+
> Search for misnamed files when a file is not found.
70+
71+
**-u**
72+
> Show unverified files. Use **-uu** to show unverified files in subdirectories.
73+
74+
**-z**
75+
> Support gzip-compressed checksum files. Use **-zz** to use gzip on all checksum files.
76+
77+
**-p** _dir_
78+
> Change to directory before processing.
79+
80+
# DESCRIPTION
81+
82+
**cfv** is a utility for testing and creating checksum verification files. It automatically detects the checksum format when verifying, and supports a wide range of formats including SFV, MD5, SHA1, SHA256, SHA512, CSV, PAR/PAR2, and BitTorrent metainfo files.
83+
84+
In test mode (default), cfv reads a checksum file and verifies that each listed file matches its recorded checksum. In create mode (**-C**), it generates a new checksum file from the specified input files. The tool can search for misnamed files, rename corrupted files, and recursively process directory trees.
85+
86+
# CONFIGURATION
87+
88+
Configuration file at **~/.cfvrc** contains default options (one per line, same syntax as command-line flags). Options on the command line override the config file.
89+
90+
# CAVEATS
91+
92+
PAR and PAR2 formats are supported for verification only, not creation. BitTorrent verification requires the original directory structure. Exit codes are bitwise-ORed: 2 (bad checksum), 4 (size mismatch), 8 (not found), 16 (file error), 32 (unverified), 64 (checksum file error).
93+
94+
# HISTORY
95+
96+
**cfv** was originally written in **Python** as an open-source checksum verification tool. It gained popularity in the file-sharing community for its broad format support, particularly SFV and MD5. The project was later forked as **cfv2** to maintain Python 3 compatibility after the original project became unmaintained.
97+
98+
# SEE ALSO
99+
100+
[md5sum](/man/md5sum)(1), [sha1sum](/man/sha1sum)(1), [sha256sum](/man/sha256sum)(1), [cksum](/man/cksum)(1)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# TAGLINE
2+
3+
Show disk usage of Docker build cache
4+
5+
# TLDR
6+
7+
**Show build cache** disk usage
8+
9+
```docker buildx du```
10+
11+
**Show detailed** disk usage with all metadata
12+
13+
```docker buildx du --verbose```
14+
15+
**Show disk usage** for a specific builder
16+
17+
```docker buildx du --builder [builder_name]```
18+
19+
**Filter** cache records by age
20+
21+
```docker buildx du --filter until=[24h]```
22+
23+
**Format output** as JSON
24+
25+
```docker buildx du --format json```
26+
27+
# SYNOPSIS
28+
29+
**docker buildx du** [_options_]
30+
31+
# PARAMETERS
32+
33+
**--filter** _key=value_
34+
> Filter output using key-value selectors.
35+
36+
**--format** _format_
37+
> Format output using a Go template or predefined format (e.g., json).
38+
39+
**--timeout** _duration_
40+
> Override default timeout for loading builder status (default: 20s).
41+
42+
**--verbose**
43+
> Show detailed output with additional metadata.
44+
45+
**--builder** _name_
46+
> Target a specific builder instance.
47+
48+
# DESCRIPTION
49+
50+
**docker buildx du** displays disk usage information for the build cache of the currently selected (or specified) builder instance. The output lists cache records with their IDs, whether they are reclaimable, their size, and when they were last accessed.
51+
52+
This command is useful for understanding how much disk space the build cache consumes before deciding to prune it with **docker buildx prune**.
53+
54+
# CAVEATS
55+
56+
Asterisks in the output indicate mutable records (size may change) or shared storage that overlaps with other resources. The reported sizes may not reflect actual reclaimable space when records are shared between builds.
57+
58+
# SEE ALSO
59+
60+
[docker-buildx-prune](/man/docker-buildx-prune)(1), [docker-buildx-ls](/man/docker-buildx-ls)(1), [docker-build](/man/docker-build)(1), [docker](/man/docker)(1)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# TAGLINE
2+
3+
List Docker Buildx builder instances
4+
5+
# TLDR
6+
7+
**List all builder** instances
8+
9+
```docker buildx ls```
10+
11+
**List builders** without truncating output
12+
13+
```docker buildx ls --no-trunc```
14+
15+
**List builders** with a custom format
16+
17+
```docker buildx ls --format "{{.Name}}: {{.Status}}"```
18+
19+
**List builders** as JSON
20+
21+
```docker buildx ls --format json```
22+
23+
# SYNOPSIS
24+
25+
**docker buildx ls** [_options_]
26+
27+
# PARAMETERS
28+
29+
**--format** _format_
30+
> Format output using a Go template or predefined format. Default: table.
31+
32+
**--no-trunc**
33+
> Do not truncate output.
34+
35+
**--timeout** _duration_
36+
> Override default timeout for loading builder status (default: 20s).
37+
38+
# DESCRIPTION
39+
40+
**docker buildx ls** lists all builder instances and their associated nodes. The output shows the builder name, driver, endpoint, status, BuildKit version, and supported platforms. The currently selected builder is marked with an asterisk (**\***).
41+
42+
Each builder may have multiple nodes representing different build environments or platforms. The default builder uses the Docker daemon's built-in build capabilities, while additional builders can use the **docker-container**, **kubernetes**, or **remote** drivers.
43+
44+
# CAVEATS
45+
46+
Builder status is loaded with a default 20-second timeout. Builders using remote drivers or Kubernetes may appear as inactive if the endpoint is unreachable within the timeout window.
47+
48+
# SEE ALSO
49+
50+
[docker-buildx-rm](/man/docker-buildx-rm)(1), [docker-buildx-du](/man/docker-buildx-du)(1), [docker-build](/man/docker-build)(1), [docker](/man/docker)(1)
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# TAGLINE
2+
3+
Remove Docker Buildx build cache
4+
5+
# TLDR
6+
7+
**Prune all build cache** with confirmation prompt
8+
9+
```docker buildx prune```
10+
11+
**Force prune** without confirmation
12+
13+
```docker buildx prune -f```
14+
15+
**Prune all cache** including internal and frontend images
16+
17+
```docker buildx prune --all```
18+
19+
**Prune cache** older than 24 hours
20+
21+
```docker buildx prune --filter until=[24h]```
22+
23+
**Prune cache** and keep at most 2 GB
24+
25+
```docker buildx prune --max-used-space [2gb]```
26+
27+
**Prune cache** ensuring at least 10 GB free disk space
28+
29+
```docker buildx prune --min-free-space [10gb]```
30+
31+
# SYNOPSIS
32+
33+
**docker buildx prune** [_options_]
34+
35+
# PARAMETERS
36+
37+
**-a**, **--all**
38+
> Remove all cache including internal and frontend images.
39+
40+
**-f**, **--force**
41+
> Skip the confirmation prompt.
42+
43+
**--filter** _key=value_
44+
> Filter cache records to prune (e.g., until=24h, type, inuse, shared).
45+
46+
**--max-used-space** _size_
47+
> Maximum total disk space for the cache (e.g., 2gb, 512mb).
48+
49+
**--min-free-space** _size_
50+
> Target amount of free disk space after pruning.
51+
52+
**--reserved-space** _size_
53+
> Minimum disk space permanently reserved for cache.
54+
55+
**--timeout** _duration_
56+
> Override default timeout for loading builder status (default: 20s).
57+
58+
**--verbose**
59+
> Show detailed output.
60+
61+
# DESCRIPTION
62+
63+
**docker buildx prune** clears the build cache of the currently selected builder instance. By default it removes only reclaimable cache entries, prompting for confirmation. With **--all**, it also removes internal and frontend images.
64+
65+
The space management flags (**--max-used-space**, **--min-free-space**, **--reserved-space**) allow fine-grained control over disk usage. The **--filter** flag supports selectors like **until**, **id**, **type**, **inuse**, **mutable**, **shared**, and **private**, combined with AND logic.
66+
67+
# CAVEATS
68+
69+
Without **--all**, internal images and frontend cache are preserved. Space flags accept human-readable values (e.g., 128mb, 2gb). When multiple space flags are specified, all constraints are honored simultaneously.
70+
71+
# SEE ALSO
72+
73+
[docker-buildx-du](/man/docker-buildx-du)(1), [docker-buildx-rm](/man/docker-buildx-rm)(1), [docker-build](/man/docker-build)(1), [docker](/man/docker)(1)

0 commit comments

Comments
 (0)