Build & Push
After developing your AI agent, you need to package it as a Docker image and push it to a container registry before deploying to Agent Cloud. This section covers the build and push commands.
Build
The build command creates a Docker image for your agent using a Dockerfile.
Usage
videosdk agent build [OPTIONS]
Options
| Option | Short | Description | Default |
|---|---|---|---|
--image | -i | Image name with optional tag (e.g., myrepo/myagent:v1) | From videosdk.yaml |
--file | -f | Path to Dockerfile | ./Dockerfile |
What Happens
- Dockerfile Detection: The CLI locates your Dockerfile (default:
./Dockerfile) - Image Build: Docker builds the image for the
linux/arm64platform - Local Storage: The built image is stored in your local Docker registry
Example Output
$ videosdk agent build --image myrepo/myagent:v1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Building Docker Image
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Platform linux/arm64
Image myrepo/myagent:v1
Dockerfile /path/to/your/project/Dockerfile
────────────────────────────────────────
[Docker build output...]
✓ Successfully built image: myrepo/myagent:v1
Examples
# Build with explicit image name
videosdk agent build --image myrepo/myagent:v1
# Build with custom Dockerfile
videosdk agent build --image myrepo/myagent:v1 --file Dockerfile.prod
# Build using image from videosdk.yaml
videosdk agent build
Notes
- The image name must be lowercase
- If
--imageis not provided, the CLI reads fromagent.imagein yourvideosdk.yaml - Docker must be installed and running on your machine
- The build uses
linux/arm64platform for Agent Cloud compatibility
Push
The push command uploads your Docker image to a container registry.
Usage
videosdk agent push [OPTIONS]
Options
| Option | Short | Description | Default |
|---|---|---|---|
--image | -i | Image name with tag (e.g., myrepo/myagent:v1) | From videosdk.yaml |
--server | -s | Registry server URL | docker.io |
--username | -u | Registry username for authentication | None |
--password | -p | Registry password for authentication | None |
What Happens
- Authentication (optional): If credentials are provided, the CLI logs into the registry
- Image Push: The Docker image is uploaded to the specified registry
- Ready for Deploy: The image is now available for Agent Cloud deployments
Example Output
$ videosdk agent push --image myrepo/myagent:v1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pushing Docker Image
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Image myrepo/myagent:v1
Registry docker.io
────────────────────────────────────────
[Docker push output...]
✓ Successfully pushed image: myrepo/myagent:v1
Examples
# Push to Docker Hub (default)
videosdk agent push --image myrepo/myagent:v1
# Push to GitHub Container Registry with authentication
videosdk agent push --image myrepo/myagent:v1 --server ghcr.io -u username -p token
# Push to private registry
videosdk agent push --image myrepo/myagent:v1 --server registry.example.com -u user -p pass
# Push using image from videosdk.yaml
videosdk agent push
Supported Registries
| Registry | Server URL |
|---|---|
| Docker Hub | docker.io (default) |
| GitHub Container Registry | ghcr.io |
| AWS ECR | <account>.dkr.ecr.<region>.amazonaws.com |
| Google Container Registry | gcr.io |
| Azure Container Registry | <registry>.azurecr.io |
Notes
- Ensure the image is built before pushing (
videosdk agent build) - For Docker Hub, you can omit
--serveras it's the default - For private registries, you must provide authentication credentials
- The registry server is automatically detected from the image name if
--serveris not specified
yaml Configuration
Both commands can read the image name from your videosdk.yaml configuration file:
agent:
id: your-agent-id
image: myrepo/myagent:v1
When the image is configured in videosdk.yaml, you can simply run:
videosdk agent build
videosdk agent push
Example
Here's a typical workflow for building and pushing your agent:
# 1. Build the Docker image
videosdk agent build --image myrepo/myagent:v1
# 2. Push to container registry
videosdk agent push --image myrepo/myagent:v1
# 3. Deploy to Agent Cloud (covered in deployment docs)
videosdk agent deploy --image myrepo/myagent:v1
Next Steps
After pushing your image to a container registry, you're ready to deploy your agent to Agent Cloud. See the deployment documentation for more details.
Got a Question? Ask us on discord

