Search code examples
dockerwso2wso2-micro-integratorwso2-ml

How to increase CARBON_LOGFILE when building docker image from base image?


We have currently hosted the standard wso2mi:4.2.0 as base image, where the CARBON_LOGFILE size is having the default value 10 MB. due to that when we build images it always getting created with the default CARBON_LOGFILE size from base image.

Is there a way we can set the size while building the image? can we do it through deployment.toml?

Thanks


Solution

  • You can maintain a copy of the log4j2.properties along with the Dockerfile with the CARBON_LOGFILE size set to whatever the size you need. Then copy this file when building the image.

    appender.CARBON_LOGFILE.policies.size.size=100MB