CLI Reference¶
This reference covers all subcommands and options available in the container-compose CLI. container-compose is a tool to use and manage Docker Compose files with Apple Container.
Global Flags¶
These flags are shared by all subcommands. Recognized global flags placed before the subcommand are automatically promoted to after the subcommand for compatibility with Docker Compose UX.
| Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
--file |
-f |
path | compose.yaml |
Path to compose file. |
--project-name |
-p |
string | Project name override (defaults to compose 'name:' field, then cwd basename). | |
--project-directory |
path | Project root directory for resolving relative paths (defaults to the compose file's directory). | ||
--profile |
string | Specify a profile to enable. Can be specified multiple times. | ||
--env-file |
path | .env |
Path to environment file. |
Lifecycle Commands¶
Commands for managing the lifecycle of your containers.
| Command | Description | Detailed Reference |
|---|---|---|
up |
Start containers with compose | Reference |
down |
Stop containers with compose | Reference |
start |
Start existing stopped containers | Reference |
stop |
Stop running containers without removing them | Reference |
restart |
Restart running containers | Reference |
create |
Create containers without starting them | Reference |
kill |
Force-stop project containers | Reference |
rm |
Remove stopped project containers | Reference |
Inspection Commands¶
Commands for inspecting the state of your project.
| Command | Description | Detailed Reference |
|---|---|---|
ps |
List containers for this Compose project | Reference |
ls |
List Compose projects on the host | Reference |
logs |
View output from containers | Reference |
top |
Display running processes in project containers | Reference |
port |
Print the public port for a service's private port | Reference |
events |
Stream container lifecycle events | Reference |
config |
Parse, resolve and render the compose file | Reference |
Build & Run Commands¶
Commands for building images and running one-off commands.
| Command | Description | Detailed Reference |
|---|---|---|
build |
Build images from a compose file | Reference |
pull |
Pull service images | Reference |
push |
Push service images | Reference |
run |
Run a one-off command on a service | Reference |
exec |
Execute a command in a running service container | Reference |
watch |
Monitor file changes and update services | Reference |
System & API Commands¶
Commands for managing the daemon and system state.
| Command | Description | Detailed Reference |
|---|---|---|
serve |
Start the HTTP API daemon | Reference |
system |
Manage the daemon and runtime state | Reference |
version |
Display the version information | Reference |
API Clients¶
Generated SDK publication channels for the daemon's OpenAPI surface.
| Topic | Description | Detailed Reference |
|---|---|---|
api-clients |
SDK package names, install commands, and snapshot/release channels | Reference |
Exit Codes¶
0: Success1: General error