Container CLI Commands
A container platform for macOS
Install
Section titled “Install”Download the latest release from GitHub Releases and follow the instructions for your platform.
container [--debug] <subcommand>
Global Options
Section titled “Global Options”--debug
- Enable debug output [environment: CONTAINER_DEBUG]--version
- Show the version-h, --help
- Show help information
Command Categories
Section titled “Command Categories”Commands for managing containers
Commands for managing container images
Commands for managing container registries
Commands for managing system components
Common Examples
Section titled “Common Examples”Run a container
Section titled “Run a container”Run an interactive Ubuntu container with bash shell
container run -it ubuntu:latest bash
List all containers
Section titled “List all containers”Show both running and stopped containers
container list --all
Build an image
Section titled “Build an image”Build an image from current directory with tag
container build -t myapp:latest .
Pull an image
Section titled “Pull an image”Download the latest nginx image
container images pull nginx:latest
View container logs
Section titled “View container logs”Follow the logs of a running container
container logs --follow mycontainer
Execute command in container
Section titled “Execute command in container”Execute an interactive bash session in running container
container exec -it mycontainer bash
Stop all containers
Section titled “Stop all containers”Stop all running containers
container stop --all
Remove unused images
Section titled “Remove unused images”Clean up dangling and unreferenced images
container images prune
Check system status
Section titled “Check system status”Show the status of container services
container system status
Create a network volume
Section titled “Create a network volume”Mount a host directory into the container
container run -v /host/path:/container/path myimage