hello.
I'm running a service on AWS Elastic Beanstalk (EB) with a "Docker running on 64bit Amazon Linux 2" platform.
And I am saving logs as "Instance log streaming to CloudWatch Logs" in software configuration.
However, when starting the service with docker-compose.yml, the prefix is automatically added to the front of the service log, and when saved to CloudWatch Logs, the JSON format log is saved as a string.
A workaround is to add the --no-log-prefix option after the docker-compose up command.
https://stackoverflow.com/questions/50360674/how-can-i-remove-prefix-with-service-name-from-logs
docker-compose up --no-log-prefix
https://docs.docker.com/engine/reference/commandline/compose_up/
This option is not supported by docker-compose.yml settings.
However, the docker-compose up command is automatically executed when the Docker platform is launched from inside AWS EB, so it seems that users cannot customize it.
Failure to add the --no-log-prefix option prevents CloudWatch from parsing the JSON logs because AWS EB treats them as strings when saving JSON logs to CloudWatch Logs.
TL;DR
I would like to find a way to add the --no-log-prefix option when running docker-compose up on AWS Elastic Beanstalk's docker platform.