Skip to content

Commit

Permalink
Update docker image jmv properties and fix stop script
Browse files Browse the repository at this point in the history
  • Loading branch information
bdhoine committed Dec 10, 2024
1 parent 65f63cd commit bccccb0
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM azul/zulu-openjdk:11-jre-headless as installer
FROM azul/zulu-openjdk:11-jre-headless AS installer

ARG AEMC_VERSION=2.0.1
ARG AEMC_VERSION=2.0.3
ARG TARGETOS=linux
ARG TARGETARCH=amd64

Expand All @@ -23,13 +23,14 @@ EXPOSE ${PORT}

WORKDIR /opt

COPY aem-start.sh /usr/local/bin/aem-start
RUN chmod +x /usr/local/bin/aem-start

COPY aem-sdk-artifacts/aem-sdk-*.zip aem/home/lib/
COPY aem/default/etc/aem.yml aem/default/etc/aem.yml

RUN aem instance --instance-${RUNMODE} launch && aem instance down

HEALTHCHECK CMD /usr/local/bin/aem instance --instance-${RUNMODE} await

COPY aem-start.sh /usr/local/bin/aem-start
RUN chmod +x /usr/local/bin/aem-start

CMD ["/usr/local/bin/aem-start"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ docker build . -t aem-sdk:author
And run the image

```shell
docker run -p 4502:4502 aem-sdk:author
docker run -p 4502:4502 -p 5005:14502 aem-sdk:author
```

To build the publish image, you need to specify the correct build arguments.
Expand All @@ -58,5 +58,5 @@ docker build \
And run the image

```shell
docker run -p 4503:4503 aem-sdk:publish
```
docker run -p 4503:4503 -p 5006:14504 aem-sdk:publish
```
6 changes: 4 additions & 2 deletions aem-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ aem_stop() {
exit 0
}

trap aem_stop INT TERM
trap aem_stop INT TERM EXIT

ln -sf /proc/1/fd/1 /opt/aem/home/var/instance/${RUNMODE}/crx-quickstart/logs/error.log

/usr/local/bin/aem instance --instance-${RUNMODE} start

tail -F /opt/aem/home/var/instance/${RUNMODE}/crx-quickstart/logs/error.log
(cat)
46 changes: 46 additions & 0 deletions aem/default/etc/aem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
instance:
config:
local_author:
active: [[.Env.AEM_AUTHOR_ACTIVE | default true ]]
http_url: [[.Env.AEM_AUTHOR_HTTP_URL | default "http://127.0.0.1:4502" ]]
user: [[.Env.AEM_AUTHOR_USER | default "admin" ]]
password: [[.Env.AEM_AUTHOR_PASSWORD | default "admin" ]]
run_modes: [ local ]
jvm_opts:
- -server
- -Xms2048m
- -Xmx2048m
- -Djava.awt.headless=true
- -XX:+CMSClassUnloadingEnabled
- -XX:+UseParallelGC
- --add-opens=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED
- --add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED
- --add-opens=java.naming/javax.naming.spi=ALL-UNNAMED
- --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED
- --add-opens=java.base/java.lang=ALL-UNNAMED
- --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
- --add-opens=java.base/java.net=ALL-UNNAMED
- -Dnashorn.args=--no-deprecation-warning"
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=[[.Env.AEM_AUTHOR_DEBUG_ADDR | default "0.0.0.0:14502" ]]
local_publish:
active: [[.Env.AEM_PUBLISH_ACTIVE | default true ]]
http_url: [[.Env.AEM_PUBLISH_HTTP_URL | default "http://127.0.0.1:4503" ]]
user: [[.Env.AEM_PUBLISH_USER | default "admin" ]]
password: [[.Env.AEM_PUBLISH_PASSWORD | default "admin" ]]
run_modes: [ local ]
jvm_opts:
- -server
- -Xms2048m
- -Xmx2048m
- -XX:+CMSClassUnloadingEnabled
- -XX:+UseParallelGC
- --add-opens=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED
- --add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED
- --add-opens=java.naming/javax.naming.spi=ALL-UNNAMED
- --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED
- --add-opens=java.base/java.lang=ALL-UNNAMED
- --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
- --add-opens=java.base/java.net=ALL-UNNAMED
- -Dnashorn.args=--no-deprecation-warning"
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=[[.Env.AEM_PUBLISH_DEBUG_ADDR | default "0.0.0.0:14503" ]]

0 comments on commit bccccb0

Please sign in to comment.