This documentation is for WSO2 Microgateway 3.0.1. View documentation for the latest release.

All docs This doc
Skip to end of metadata
Go to start of metadata

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.0.1'
    #enableDebug = ''
    #debugPort = ''
    #push = ''
    #username = ''
    #password = ''
    enable = true
        source = '<MICROGW_TOOLKIT_HOME>/resources/conf/micro-gw.conf'
        target = '/home/ballerina/conf/micro-gw.conf'
        isBallerinaConf = true

Descriptions for the configurations

ParameterDescriptionDefault Value

Name of the Docker image.

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

output .balx file name
registryName of the Docker registry.None
tagThe Docker image tag.latest
buildImageEnable or disable the option to build the Docker images.true
dockerHostDocker host IP and Docker PORT. (e.g., minikube IP and Docker PORT)unix:///var/run/docker.sock
dockerCertPathDocker cert path.null
baseImageBase image to create the Docker image.ballerina/ballerina:latest
enableDebugEnable or disable debugging.false
debugPortRemote debug port.5005
pushEnable or disable pushing the Docker image to the remote registry.false
usernameUsername for Docker registry.None
passwordPassword for Docker registry.None

ParameterDescriptionDefault Value
sourceThe source path of the file (in your local machine).None
targetThe target path (inside the container).None
isBallerinaConfThis option indicates whether the file is a Ballerina config file or not.false

The following code snippet, which is present in the above sample code, is used to enable the Docker copy files configuration in order to copy the micro-gw.conf file to the Docker image as it contains the Key Manager configurations, JWT configurations, etc.

    enable = true
        source = '<MICROGW_TOOLKIT_HOME>/resources/conf/micro-gw.conf'
        target = '/home/ballerina/conf/micro-gw.conf'
        isBallerinaConf = true
  • No labels