Skip to content
Latest (currently 2026.7.0) has the newest features, bug fixes, and CVE patches of Solo Enterprise for agentregistry.

Build image or store source code

Page as Markdown

Build the container image for your agent or store the Dockerfile and source code in a GitHub repository.

Before you can add an agent to the Solo Enterprise for agentregistry catalog so that registry users can access and deploy the agent to a connected environment, you must create a Docker image for the agent or store the agent’s source code in a GitHub repository. The method that you need to use depends on the environment that you plan to deploy your agent to.

Deployment targetExample providerDocker image vs. GitHub repo
AI runtimes in KubernetesSolo Enterprise for kagentBuild the Docker container image and push it to a container registry.
Agentic cloud platformsAWS Bedrock AgentCoreStore the Dockerfile and source code in a GitHub repository.

Build a Docker image

To deploy an agent to an AI runtime in Kubernetes, such as Solo Enterprise for kagent, agentregistry requires a Docker container image that is stored in a container registry. You can use the arctl CLI to build the image on your local machine and push it to your local or remote container registry.

Later when you add the agent to the Solo Enterprise for agentregistry catalog, you create a reference to its container image location, including the image repo and tag. This way, Solo Enterprise for agentregistry can retrieve the image and spin up the Kubernetes pod for your agent during the deployment to your Kubernetes environment.

To build a Docker image, you can choose between the following options:

  • Build the image locally. This option assumes that you want to build the agent image on your local machine only, such as for local test setups. The image is not pushed to your container registry. While you can still create a catalog entry for the agent image in Solo Enterprise for agentregistry, you cannot deploy the image to a Kubernetes cluster, unless you manually load the image to the cluster.
  • Build and push: This process allows you to build the agent image on your local machine and push it to your container registry. Note that this option requires you to be logged into the container registry that you want to use and that the agent.yaml file includes the correct container registry and image tag details.
Note that if you want to deploy your agent to an agentic cloud platform, such as AWS Bedrock AgentCore, you do not have to build a Docker image and push it to your container registry. Instead, you must store the source code in a GitHub repository and provide the link to that repository when you add your agent to the catalog. Solo Enterprise for agentregistry uses this source code to build an image that is compatible to run on AWS Bedrock AgentCore.
  1. Create and run an agent on your local machine.

  2. Review the image location and tag that was set for the agent in the agent.yaml file.

    By default, agentregistry uses localhost:5001 as the container registry and latest as the image tag, such as localhost:5001/myagent:latest. If you want to use agentregistry to push images to your container registry, make sure to update this file with the registry and image tag that you want to use. Note that this update is not required if you want to build images locally only without pushing them to your container registry.

    cat myagent/agent.yaml

    Example output:

    apiVersion: ar.dev/v1alpha1
    kind: Agent
    metadata:
      name: myagent
    spec:
      source:
         image: localhost:5001/myagent:latest
      modelProvider: gemini
      modelName: gemini-2.5-flash
      description: myagent agent
    
  3. Build the agent image on your local machine. The following command builds the image with the Dockerfile that is included in your myagent scaffold and tags it with the container registry and version information that is provided in the agent.yaml file. If you followed the instructions in the Create and run an agent guide, localhost:5001/myagent:latest is used.

    arctl build myagent

    Example output:

    Building agent image: localhost:5001/myagent:latest
    ✓ Successfully built Docker image: localhost:5001/myagent:latest
    
    To also use Solo Enterprise for agentregistry to push the image to your container registry, include the --push option. You can also set the platform, for which you want to build the image, such as linux/amd64 by using the --platform option. Note that you must log in to your container registry first, such as by using docker login for DockerHub. For more information, see the arctl build command.
  4. Verify that the image is built.

    docker images | grep myagent 

    Example output:

    localhost:5001/myagent latest  f7ba3e98adaa   11 minutes ago     2.93GB
    
  5. If you did not push the image to a container registry, load the Docker image to your cluster. This step is required in local test setups, such as kind, to test the deployment of your agent later. Note that this step is not required if you pushed the image to a container image registry that your cluster can pull from.

    kind load docker-image localhost:5001/myagent:latest --name <cluster-name>

Store source code

To deploy an agent to an agentic cloud platform, such as AWS Bedrock AgentCore, you must store the source code and Dockerfile for your agent in a GitHub repository. When you add your agent to the Solo Enterprise for agentregistry catalog, you provide the link to the GitHub repository. During the deployment to an agentic cloud platform, Solo Enterprise for agentregistry automatically compiles the source code into an image that is compatible to run on the cloud platform that you target.

If you plan to use a private repository, you must configure your GitHub or GitLab credentials in Solo Enterprise for agentregistry before you can register or deploy the agent. For more information, see Private repo access.
The steps in this guide assume that you want to create your own GitHub test repo and push the agent source code to it. Alternatively, you can use the sample agent repository that is provided by Solo.io. This repository contains the same agent source code that is generated when you follow the Create and run locally guide.
  1. Create and run an agent.

  2. Create a GitHub repository and get the URL to your repository, such as https://github.com/myorg/agent.git. For more information, see the GitHub docs.

  3. Install the git CLI.

  4. Link your local machine to your remote repository on GitHub.

    git remote add origin <github-repo-url>
  5. Push your agent source code and Dockerfile to GitHub.

    cd myagent
    git checkout main
    git add -A  
    git commit -m 'initial commit'
    git push origin main
  6. Go to your GitHub repository and verify that you see the files of your agent scaffold.

Next