Expand my Community achievements bar.

Docker + AEM + AEM logs: how to setup my local AEM so I can see logs in crx-quickstart/logs?

Avatar

Level 9

So I have setup my Dockerfile to use this entrypoint => ENTRYPOINT ["java", "-jar", "/opt/aem/cq-author-p4502.jar", "-r", "author", "-p", "4502", "-verbose"]

 
and while this works, I do not see any logs in crx-quickstart/logs when I "logged in" into the container. I can only see the logs when using CRXDE/console or system/console/slinglogs
 
--------------------------------
If I change my Docker entrypoint to => ENTRYPOINT ["/bin/bash"].
I can then run:
#docker exec -it CONTAINER-ID bash
#java -jar /opt/aem/cq-author-p4502.jar (once inside the container)

and my crx-quickstart/logs will have the proper logs available to me.


I would like to setup my docker/AEM container in such a way that

  1. I get my logs in crx-quickstart/logs because I can use Linux tools to parse the logs.
  2. I would prefer that AEM auto-starts when the container is started. I do not want to run the java command manually if I can avoid it.

In both cases, I do not have "VOLUME" setting in my Dockerfile.

 

Any ideas on how to do what I need? Thanks!
1 Reply

Avatar

Employee Advisor

have you tried to invoke the start script from your dockerfile instead of invoking the JAR directly?