nankiesof
nankiesof

Reputation: 85

How to build wso2am docker with customizing?

I add some new java class in carbon-apimgt source code,which was cloned from github.

After building with command

mvn clean install -Dmaven.test.skip=true

I get some changed jar and wars, and I replace it to wso2am-4.0.0 server path corresponding, it works fine as I can access [1] [2] [3] from browser.

[1] https://localhost:9994/publisher 
[2] https://localhost:9994/devportal
[3] https://localhost:9994/carbon
[4] https://localhost:9994/admin

All this are run by wso2am-4.0.0.zip binary.I need to make a docker image and run it in centos or ubunto , so how can i do to build a docker image to run anywhere, and use mysql instead h2?

Upvotes: 0

Views: 237

Answers (1)

RrR-
RrR-

Reputation: 1430

You can use [1] to create a docker image of the product with your custom binary. However, this will use the h2 databases by default. If you want to use MySQL, you'll have to setup the databases seperately and change the relevant configurations in deployment.toml

Alternatively, you can use [2] to run APIM with MySQL. In that case, you'll have to update [3] with the custom image you create.

[1] https://github.com/wso2/docker-apim/tree/master/dockerfiles

[2] https://github.com/wso2/docker-apim/tree/master/docker-compose/apim-with-analytics

[3] https://github.com/wso2/docker-apim/blob/master/docker-compose/apim-with-analytics/dockerfiles/apim/Dockerfile#L20

Upvotes: 1

Related Questions