-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate image and update healthcheck
- Loading branch information
Showing
1 changed file
with
11 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
FROM azul/zulu-openjdk:11-jre-headless AS installer | ||
FROM azul/zulu-openjdk:11-jre-headless | ||
|
||
ARG AEMC_VERSION=2.0.3 | ||
ARG TARGETOS=linux | ||
ARG TARGETARCH=amd64 | ||
|
||
RUN apt-get update &&\ | ||
apt-get install -y --no-install-recommends curl | ||
|
||
RUN curl -L https://github.com/wttech/aemc/releases/download/v${AEMC_VERSION}/aemc-cli_${TARGETOS}_${TARGETARCH}.tar.gz | tar -xz -C /usr/local/bin | ||
|
||
FROM azul/zulu-openjdk:11-jre-headless | ||
|
||
ARG AEMC_VERSION=2.0.3 | ||
ARG RUNMODE=author | ||
ARG PORT=4502 | ||
|
||
ENV RUNMODE=${RUNMODE} | ||
ENV PORT=${PORT} | ||
ENV AEM_VENDOR_JAVA_HOME_DIR=$JAVA_HOME | ||
|
||
COPY --from=installer /usr/local/bin/aem /usr/local/bin/aem | ||
|
||
EXPOSE ${PORT} | ||
|
||
WORKDIR /opt | ||
|
||
RUN apt-get update &&\ | ||
apt-get install -y --no-install-recommends curl &&\ | ||
apt-get clean &&\ | ||
rm -rf /var/cache/apk/* &&\ | ||
curl -L https://github.com/wttech/aemc/releases/download/v${AEMC_VERSION}/aemc-cli_${TARGETOS}_${TARGETARCH}.tar.gz | tar -xz -C /usr/local/bin | ||
|
||
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 | ||
|
||
HEALTHCHECK CMD /usr/bin/curl -f http://localhost:${PORT}/systemready | ||
|
||
CMD ["/usr/local/bin/aem-start"] |