Remote debugging AEMaaCS in docker
Hi,
I am trying to setup a local AEM instance with docker. So far I was able to setup a Author, Publish and dispatcher. But I only have issues with setting up the JVM remote debugging. I am able to connect the JVM debugger it is just not stopping at the breakpoints. This is the setup :
Dockerfile :
FROM openjdk:11
WORKDIR /opt/aem
EXPOSE 4502
EXPOSE 5005
COPY author-p4502.jar /opt/aem/author-p4502.jar
COPY start.sh /opt/aem/start.sh
COPY install /opt/aem/install/
RUN chmod +x /opt/aem/start.sh
CMD ["/opt/aem/start.sh"]
Docker-compose.yml :
version: '3.8'
services:
aem-author:
build:
context: ./author
container_name: aem-author
ports:
- "4502:4502"
- "5005:5005"
environment:
- AEM_RUNMODE=author
- JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
volumes:
- ./author/crx-quickstart:/opt/aem/crx-quickstart
aem-publish:
build:
context: ./publish
container_name: aem-publish
ports:
- "4503:4503"
environment:
- AEM_RUNMODE=publish
volumes:
- ./publish/crx-quickstart:/opt/aem/crx-quickstart
aemaacs-dispatcher:
build:
context: ./adobe-dxp-dispatcher
container_name: aemaacs-dispatcher
ports:
- "80:80"
depends_on:
- aem-publish
volumes:
- ./adobe-dxp-dispatcher/src/conf.d:/etc/httpd/conf.d
- ./adobe-dxp-dispatcher/src/conf.dispatcher.d:/etc/httpd/conf.dispatcher.d
Start.sh :
#!/bin/bash
echo "Starting AEM in author mode and debug port 5033..."
export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
java $JAVA_OPTS -jar /opt/aem/author-p4502.jar &
sleep 60
FLAG_FILE="/opt/aem/install/.package_installed"
if [ ! -f "$FLAG_FILE" ]; then
echo "Deploying content package for the first time..."
curl -u admin:admin -F file=@/opt/aem/install/content.zip -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp
touch "$FLAG_FILE"
else
echo "Content package already installed, skipping deployment."
fi
tail -f /dev/null
If someone could help me out that would be great!