Skip to content

Commit e21c6ec

Browse files
authored
Merge pull request #331 from pipecat-ai/mb/pcc-docker-cli
pcc: Add docker command docs
2 parents 484dcb6 + 5259cfa commit e21c6ec

File tree

2 files changed

+169
-0
lines changed

2 files changed

+169
-0
lines changed
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: docker
3+
description: "Build and push Docker images for agent deployments"
4+
---
5+
6+
The `docker` command provides utilities for building, tagging, and pushing Docker images to container registries. This command automatically parses registry information from your deployment configuration and supports both Docker Hub and custom registries.
7+
8+
## build-push
9+
10+
Build, tag, and push a Docker image for your agent deployment. This command reads configuration from your `pcc-deploy.toml` file to automatically determine registry settings, image names, and versions.
11+
12+
**Usage:**
13+
14+
```shell
15+
pcc docker build-push [ARGS] [OPTIONS]
16+
```
17+
18+
**Arguments:**
19+
20+
<ParamField path="agent-name" type="string">
21+
Name of the agent to build image for. If not provided, uses the `agent_name`
22+
from your `pcc-deploy.toml` file.
23+
</ParamField>
24+
25+
**Registry Configuration:**
26+
27+
<ParamField path="--registry / -r" type="string">
28+
Registry type to push to. Supported values: `dockerhub`, `custom`. When not
29+
specified, automatically detected from the `image` field in your
30+
`pcc-deploy.toml` file.
31+
</ParamField>
32+
33+
<ParamField path="--username / -u" type="string">
34+
Registry username for authentication. When not specified, automatically parsed
35+
from the `image` field in your `pcc-deploy.toml` file (e.g., `myusername` from
36+
`myusername/app:1.0`).
37+
</ParamField>
38+
39+
<ParamField path="--registry-url" type="string">
40+
Custom registry URL (required for custom registries). When not specified,
41+
automatically parsed from the `image` field for custom registries (e.g.,
42+
`gcr.io` from `gcr.io/project/app:1.0`).
43+
</ParamField>
44+
45+
**Build Configuration:**
46+
47+
<ParamField path="--version / -v" type="string">
48+
Version tag for the image. When not specified, automatically extracted from
49+
the `image` field in your `pcc-deploy.toml` file (e.g., `1.0` from
50+
`myusername/app:1.0`).
51+
</ParamField>
52+
53+
<ParamField path="--no-push" type="boolean" default="false">
54+
Build and tag only, do not push to registry. Useful for local testing or when
55+
you want to push manually later.
56+
</ParamField>
57+
58+
<ParamField path="--no-latest" type="boolean" default="false">
59+
Do not tag the image as `latest`. By default, images are tagged with both the
60+
specified version and `latest`.
61+
</ParamField>
62+
63+
## Configuration
64+
65+
The `docker build-push` command reads configuration from your `pcc-deploy.toml` file to minimize required command-line arguments. Here's how different registry setups work:
66+
67+
### Docker Hub (Default)
68+
69+
For Docker Hub repositories, the minimal configuration is:
70+
71+
```toml
72+
agent_name = "my-agent"
73+
image = "myusername/my-agent:1.0"
74+
```
75+
76+
This automatically configures:
77+
78+
- Registry: `dockerhub`
79+
- Username: `myusername`
80+
- Agent name: `my-agent`
81+
- Version: `1.0`
82+
83+
### Custom Registry
84+
85+
For custom registries like Google Container Registry, AWS ECR, or private registries:
86+
87+
```toml
88+
agent_name = "my-agent"
89+
image = "gcr.io/my-project/my-agent:1.0"
90+
```
91+
92+
This automatically configures:
93+
94+
- Registry: `custom`
95+
- Registry URL: `gcr.io`
96+
- Username/Project: `my-project`
97+
- Agent name: `my-agent`
98+
- Version: `1.0`
99+
100+
### Docker Configuration Section
101+
102+
For advanced configuration, add a `[docker]` section:
103+
104+
```toml
105+
agent_name = "my-agent"
106+
image = "myusername/my-agent:1.0"
107+
108+
[docker]
109+
auto_latest = false # Don't tag as 'latest'
110+
```
111+
112+
Available `[docker]` options:
113+
114+
<ParamField path="auto_latest" type="boolean" default="true">
115+
Whether to automatically tag the image as `latest` in addition to the
116+
specified version.
117+
</ParamField>
118+
119+
## Examples
120+
121+
### Basic Usage (Recommended)
122+
123+
With a properly configured `pcc-deploy.toml`:
124+
125+
```shell
126+
# Build and push using all configuration from pcc-deploy.toml
127+
pcc docker build-push
128+
```
129+
130+
### Override Version
131+
132+
```shell
133+
# Use a different version than what's in pcc-deploy.toml
134+
pcc docker build-push --version 2.0
135+
```
136+
137+
### Build Only
138+
139+
```shell
140+
# Build and tag locally without pushing
141+
pcc docker build-push --no-push
142+
```
143+
144+
### Different Registry
145+
146+
```shell
147+
# Override registry settings for one-time builds
148+
pcc docker build-push --registry custom --registry-url my-registry.com --username myuser
149+
```
150+
151+
### Skip Latest Tag
152+
153+
```shell
154+
# Only tag with the specific version, not 'latest'
155+
pcc docker build-push --no-latest
156+
```
157+
158+
## Platform Support
159+
160+
All images are built for the `linux/arm64` platform, which is required for Pipecat Cloud deployments. This is automatically configured and cannot be changed.
161+
162+
## Error Handling
163+
164+
The command provides helpful error messages for common issues:
165+
166+
- **Authentication errors**: Suggests the appropriate `docker login` command
167+
- **Missing Dockerfile**: Indicates that a Dockerfile must be present in the current directory
168+
- **Registry access issues**: Provides guidance on checking permissions and authentication

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@
547547
"deployment/pipecat-cloud/cli-reference/agent",
548548
"deployment/pipecat-cloud/cli-reference/auth",
549549
"deployment/pipecat-cloud/cli-reference/deploy",
550+
"deployment/pipecat-cloud/cli-reference/docker",
550551
"deployment/pipecat-cloud/cli-reference/init",
551552
"deployment/pipecat-cloud/cli-reference/organizations",
552553
"deployment/pipecat-cloud/cli-reference/secrets"

0 commit comments

Comments
 (0)