Export the integration artifacts into a CAR file.
Create the Dockerfile as shown below. This file contains instructions to download the base Docker image of WSO2 Micro Integrator from DockerHub (community version) or the WSO2 Docker Registry (includes updates), and to copy the integration artifacts to the Micro Integrator.
Code Block title Dockerfile
FROM <docker_image_name>:1.0.0 COPY <directoy_path>/<capp_name> /home/wso2eiwso2carbon/wso2mi/repository/deployment/server/carbonapps
Expand title About the Dockerfile
The information specified in the Docker file is as follows:
The 'FROM' tag in the docker file specifies the WSO2 Micro Integrator version that should be downloaded. You can use the updated Docker image or the community version as shown below. The version is 1.0.0 of the WSO2 Micro Integrator. If required, you can use an earlier version by replacing 'latest' with the version number.
Code Block title Example 1: Docker image with updates
Code Block title Example 2: Docker image without updates (community version)
The 'COPY' tag in the docker file specifies the directory path to your composite application, followed by the location in your Docker instance to which the composite application should be copied.
Code Block title Example 1
COPY carbonapps /home/wso2eiwso2carbon/wso2mi/repository/deployment/server/carbonapps
If you have multiple composite application that you want to deploy in Docker using a single Docker image, add another entry to the Dockerfile. For example:
Code Block title Example 2
COPY carbonapps /home/wso2eiwso2carbon/wso2mi/repository/deployment/server/carbonapps COPY <sample_carbon_app> /home/wso2eiwso2carbon/wso2mi/repository/deployment/server/carbonapps
Create an immutable Docker image for your integration artifacts on WSO2 Micro Integrator by executing the following command from the location of your Dockerfile.
docker build -t sample_docker_image .
Start a Docker container by running the Docker image as shown below.
docker run -d -p 8290:8290 sample_docker_image