Skip to main content

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

OptionShortDescriptionDefault
--image-iImage name with optional tag (e.g., myrepo/myagent:v1)From videosdk.yaml
--file-fPath to Dockerfile./Dockerfile

What Happens

  1. Dockerfile Detection: The CLI locates your Dockerfile (default: ./Dockerfile)
  2. Image Build: Docker builds the image for the linux/arm64 platform
  3. 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 --image is not provided, the CLI reads from agent.image in your videosdk.yaml
  • Docker must be installed and running on your machine
  • The build uses linux/arm64 platform for Agent Cloud compatibility

Push

The push command uploads your Docker image to a container registry.

Usage

videosdk agent push [OPTIONS]

Options

OptionShortDescriptionDefault
--image-iImage name with tag (e.g., myrepo/myagent:v1)From videosdk.yaml
--server-sRegistry server URLdocker.io
--username-uRegistry username for authenticationNone
--password-pRegistry password for authenticationNone

What Happens

  1. Authentication (optional): If credentials are provided, the CLI logs into the registry
  2. Image Push: The Docker image is uploaded to the specified registry
  3. 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

RegistryServer URL
Docker Hubdocker.io (default)
GitHub Container Registryghcr.io
AWS ECR<account>.dkr.ecr.<region>.amazonaws.com
Google Container Registrygcr.io
Azure Container Registry<registry>.azurecr.io

Notes

  • Ensure the image is built before pushing (videosdk agent build)
  • For Docker Hub, you can omit --server as it's the default
  • For private registries, you must provide authentication credentials
  • The registry server is automatically detected from the image name if --server is 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