deployment.toml for Docker

You need to create a deployment-config.toml file and use it as the input to the WSO2 API Microgateway Toolkit in order to create a Docker image by including the runtime executable artifacts, so that you do not have to mount the artifacts from outside. When using this approach, it will generate the Docker images from the WSO2 API Microgateway base image by including all the API runtime artifacts as well.

Sample file

The following is a sample deployment-config.toml file.

    enable = true
    name = "petstore"
    registry = ''
    tag = 'v1'
    #buildImage = ''
    #dockerHost = ''
    #dockerCertPath = ''
    baseImage = 'wso2/wso2micro-gw:3.2.0'
    #enableDebug = ''
    #debugPort = ''
    #push = ''
    #username = ''
    #password = ''
    #cmd = 'CMD gateway ${APP}'
    enable = false
        source = '<MICROGW_TOOLKIT_HOME>/resources/conf/micro-gw.conf'
        target = '/home/ballerina/conf/micro-gw.conf'
        isBallerinaConf = true

Descriptions for the configurations

Parameter Description Default Value

Name of the Docker image.


Note that the Docker image name must be specified in lower case.

output .jar file name
registry Name of the Docker registry. None
tag The Docker image tag. latest
buildImage Enable or disable the option to build the Docker images. true
dockerHost Docker host IP and Docker PORT. (e.g., minikube IP and Docker PORT) unix:///var/run/docker.sock
dockerCertPath Docker cert path. null
baseImage Base image to create the Docker image. ballerina/ballerina:latest
enableDebug Enable or disable debugging. false
debugPort Remote debug port. 5005
push Enable or disable pushing the Docker image to the remote registry. false
username Username for Docker registry. None
password Password for Docker registry. None
cmd Command to execute the Microgateway. You can provide additional flags if needed. (e.g. CMD gateway ${APP} --b7a.http.accesslog.console=true CMD gateway ${APP})
Parameter Description Default Value
source The source path of the file (in your local machine). None
target The target path (inside the container). None
isBallerinaConf This option indicates whether the file is a Ballerina config file or not. false