# bootc image - External Commands Reference ## Overview This document provides a comprehensive reference for all external commands used by `bootc image` operations. These commands are essential for understanding the dependencies and integration points of the bootc image system. ## Core Commands ### bootc **Purpose**: Main bootc command for image operations **Usage**: `bootc image [options...]` **Dependencies**: None (core command) #### Subcommands - `bootc image list` - List images in bootc storage - `bootc image copy-to-storage` - Copy images to containers-storage - `bootc image pull-from-default-storage` - Pull images from default storage - `bootc image cmd` - Wrapper for podman image commands #### Examples ```bash # List all images bootc image list # List host images only bootc image list --type=host # List in JSON format bootc image list --format=json # Copy current image to containers-storage bootc image copy-to-storage # Copy specific image bootc image copy-to-storage --source=quay.io/myorg/debian-bootc:v2.0 # Pull image from default storage bootc image pull-from-default-storage quay.io/myorg/debian-bootc:v2.0 ``` ### podman **Purpose**: Container runtime and image management **Usage**: `podman image [options...]` **Dependencies**: podman package, containers-storage #### Image Subcommands - `podman image list` - List images - `podman image build` - Build images - `podman image pull` - Pull images - `podman image push` - Push images - `podman image tag` - Tag images - `podman image inspect` - Inspect images - `podman image exists` - Check if image exists - `podman image prune` - Remove unused images - `podman image rmi` - Remove images #### Examples ```bash # List all images podman image list # Build image podman image build -t myimage:latest . # Pull image podman image pull quay.io/myorg/debian-bootc:v2.0 # Push image podman image push myimage:latest # Tag image podman image tag myimage:latest localhost/myimage:latest # Inspect image podman image inspect myimage:latest # Check if image exists podman image exists myimage:latest # Remove unused images podman image prune -a # Remove specific image podman image rmi myimage:latest ``` #### Storage Configuration ```bash # Check podman info podman info # Check storage configuration podman info --format=json | jq '.store' # Check storage root podman info --format=json | jq '.store.graphRoot' # Check run root podman info --format=json | jq '.store.runRoot' ``` ## Storage Commands ### ostree **Purpose**: OSTree repository operations **Usage**: `ostree [options...]` **Dependencies**: ostree package #### Repository Commands - `ostree log` - Show commit log - `ostree show` - Show commit details - `ostree refs` - List references - `ostree ls` - List repository contents - `ostree cat` - Show file contents - `ostree checkout` - Checkout files - `ostree admin status` - Show admin status - `ostree admin pin` - Pin deployments - `ostree admin unpin` - Unpin deployments #### Examples ```bash # Show repository status ostree admin status # List references ostree refs # Show commit details ostree show # List repository contents ostree ls # Show file contents ostree cat /path/to/file # Checkout files ostree checkout /path/to/destination ``` ### containers-storage **Purpose**: Container storage management **Usage**: `containers-storage [options...]` **Dependencies**: containers-storage package #### Storage Commands - `containers-storage list` - List storage contents - `containers-storage info` - Show storage information - `containers-storage prune` - Clean up storage - `containers-storage gc` - Garbage collect #### Examples ```bash # List storage contents containers-storage list # Show storage information containers-storage info # Clean up storage containers-storage prune # Garbage collect containers-storage gc ``` ## System Commands ### systemctl **Purpose**: Systemd service management **Usage**: `systemctl [options...]` **Dependencies**: systemd #### Service Commands - `systemctl status` - Show service status - `systemctl start` - Start service - `systemctl stop` - Stop service - `systemctl restart` - Restart service - `systemctl enable` - Enable service - `systemctl disable` - Disable service - `systemctl reload` - Reload service #### Examples ```bash # Check service status systemctl status bootc # Start service systemctl start bootc # Stop service systemctl stop bootc # Restart service systemctl restart bootc # Enable service systemctl enable bootc # Disable service systemctl disable bootc ``` ### mount **Purpose**: Filesystem mounting **Usage**: `mount [options...] ` **Dependencies**: util-linux #### Mount Commands - `mount` - Mount filesystem - `umount` - Unmount filesystem - `mountpoint` - Check if directory is mountpoint - `findmnt` - Find mounted filesystems #### Examples ```bash # Mount filesystem mount /dev/sda1 /mnt # Unmount filesystem umount /mnt # Check mountpoint mountpoint /mnt # Find mounted filesystems findmnt # Find specific mount findmnt /mnt ``` ### df **Purpose**: Disk space usage **Usage**: `df [options...] [file...]` **Dependencies**: coreutils #### Examples ```bash # Show disk usage df -h # Show specific filesystem df -h /var/lib/bootc # Show inode usage df -i # Show all filesystems df -a ``` ### du **Purpose**: Directory space usage **Usage**: `du [options...] [file...]` **Dependencies**: coreutils #### Examples ```bash # Show directory usage du -h /var/lib/bootc # Show total usage du -sh /var/lib/bootc # Show usage by subdirectory du -h --max-depth=1 /var/lib/bootc # Show usage of all files du -ah /var/lib/bootc ``` ## Network Commands ### curl **Purpose**: HTTP client for registry operations **Usage**: `curl [options...] ` **Dependencies**: curl #### Examples ```bash # Download file curl -O https://example.com/file.tar # Get HTTP headers curl -I https://example.com # POST data curl -X POST -d "data" https://example.com # With authentication curl -u username:password https://example.com # With custom headers curl -H "Authorization: Bearer token" https://example.com ``` ### wget **Purpose**: HTTP client for downloading files **Usage**: `wget [options...] ` **Dependencies**: wget #### Examples ```bash # Download file wget https://example.com/file.tar # Download with progress wget --progress=bar https://example.com/file.tar # Download recursively wget -r https://example.com/ # Download with authentication wget --user=username --password=password https://example.com ``` ### ping **Purpose**: Network connectivity testing **Usage**: `ping [options...] ` **Dependencies**: iputils #### Examples ```bash # Ping host ping example.com # Ping with count ping -c 4 example.com # Ping with timeout ping -W 5 example.com # Ping IPv6 ping6 example.com ``` ## Data Processing Commands ### jq **Purpose**: JSON processing **Usage**: `jq [options...] [file...]` **Dependencies**: jq #### Examples ```bash # Pretty print JSON echo '{"key":"value"}' | jq . # Extract value echo '{"key":"value"}' | jq '.key' # Filter array echo '[{"name":"a"},{"name":"b"}]' | jq '.[] | select(.name == "a")' # Transform data echo '{"key":"value"}' | jq '{newkey: .key}' # Read from file jq '.key' file.json ``` ### yq **Purpose**: YAML processing **Usage**: `yq [options...] [file...]` **Dependencies**: yq #### Examples ```bash # Pretty print YAML yq eval '.' file.yaml # Extract value yq eval '.key' file.yaml # Set value yq eval '.key = "newvalue"' file.yaml # Delete key yq eval 'del(.key)' file.yaml # Convert to JSON yq eval -o=json file.yaml ``` ### grep **Purpose**: Text searching **Usage**: `grep [options...] [file...]` **Dependencies**: grep #### Examples ```bash # Search in file grep "pattern" file.txt # Search recursively grep -r "pattern" /path/to/dir # Case insensitive grep -i "pattern" file.txt # Show line numbers grep -n "pattern" file.txt # Show context grep -C 3 "pattern" file.txt ``` ### sed **Purpose**: Text editing **Usage**: `sed [options...]