Deploying agents in Docker
You can use the Visual Studio Code editor to deploy and run the agent in Docker.
Before you begin
Building the Docker image
- Run the following command from agent-sdk-managed-implementation location in
the
terminal:
gradle buildDockerImage (if you configured Gradle globally in your system) (or) ./gradlew buildDockerImagebuildDockerImage builds a Docker image with the default image tag name. The default docker image tag that is specified in the build.gradle file is agent-managed-sdk:latest.
- Verify whether the agent-managed-sdk:latest image is listed in the docker images by
using the following command:
docker imagesTo rename the tag, specify the following command from agent-sdk-managed-implementation location in the terminal:
gradle buildDockerImage -Ptag=<new_tag_name> (or) ./gradlew buildDockerImage -Ptag=<new_tag_name>The new image tag is created with the specified name.
Starting the Docker image
- In the Visual Studio Code editor, open docker-compose from
agent-sdk-<version>-with-implementation-samples\samples\deployment
The .env and docker-compose.yml files include properties that are outlined in the application.properties file.
- Specify the value for each property.
If you replaced the default Docker image name, make sure to update the DOCKER_IMAGE property with the new name.
- Run the following command from the deployment location in the
terminal:
docker-compose up -dThe agent application starts. You can verify whether the runtime name that is specified in the .env file is listed on the Runtimes tab in the Catalog page in the UI.