Skip to content

Deploy as a Docker Image

This guide explains how to deploy an integration as a Docker image.

  • Navigate to the Visualizer view by clicking on the BI icon on the sidebar.
  • Click on the Deploy with Docker under the Deployment Options section in the right panel.
  • Click Create Docker Image button.
    Build Docker Image

  • The integration will be built as a Docker image and the image will be available in the local Docker registry.

Note: You can see the generated Dockerfile in /target/docker/<integration-name>.

Execute the Docker image

Follow the steps below to execute the Docker image.

  1. Execute the docker images command to verify if the Docker image is generated.
docker images

The output will be similar to the following:

REPOSITORY                                          TAG                    IMAGE ID             CREATED                SIZE
fake_store_manager                          latest                 e971e4336f71   58 minutes ago   237MB
  1. Execute the docker run -d -v <path/to/config>/Config.toml:/home/ballerina/Config.toml -p 8090:8090 fake_store_manager:latest command to run the generated Docker image.

  2. Call the http://localhost:8090/store/products API via try-it and see the output.

Try-it docker hosted service