diff --git a/README.md b/README.md index 7572c84..56d2601 100644 --- a/README.md +++ b/README.md @@ -15,22 +15,25 @@ Tags ====== * `:latest` ([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/base/Dockerfile)) - Latest stable version -* `:commandbox-5.5.2` - Stable image tagged with the version of CommandBox used to build the image -* `:3.5.5` - Tagged version of the image +* `:3.9.0` - Tagged version of the image - not to be confused with the version of CommandBox within the image * `:snapshot` - Development/BE version * `:[tag]-snapshot` - Development/BE version of a tagged variations (e.g. - `:adobe2021-snapshot`) * `:jdk8` - Base image using OpenJDK8 * `:jre11` - Base image using OpenJDK11 JRE * `:jdk11` - Base image using OpenJDK11 full JDK +* `:jre17` - Base image using OpenJDK17 JRE +* `:jdk17` - Base image using OpenJDK17 full JDK * `:alpine` ([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/base/Alpine.Dockerfile)) - [Alpine Linux](https://alpinelinux.org/about/) version of the image - slight decrease in overall size and optimizations for containerized runtimes * `:ubi9` ([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/base/ubi9.Dockerfile)) - [RHEL Universal Base Image](https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e) version of the image -* `:[engine][version]` - Containers with warmed-up engines - saves having to download the server WAR during container start: `:lucee5`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Lucee5.Dockerfile)), `:lucee-light`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/LuceeLight.Dockerfile)), `:adobe2018`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Adobe2018.Dockerfile)), `:adobe2021`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Adobe2021.Dockerfile)) +* `:[engine][version]` - Containers with warmed-up engines - saves having to download the server WAR during container start: `:lucee5`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Lucee5.Dockerfile)), `:lucee-light`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/LuceeLight.Dockerfile)), `:adobe2018`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Adobe2018.Dockerfile)), `:adobe2021`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Adobe2021.Dockerfile)), `:adobe2023`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/debian/Adobe2023.Dockerfile)) * `:[engine][version]-alpine` - Alpine linux versions of the image with warmed-up engines: `:lucee5-alpine`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/alpine/Lucee5.Dockerfile)), `:lucee-light-alpine`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/alpine/LuceeLight.Dockerfile)), `:adobe2018-alpine`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/alpine/Adobe2018.Dockerfile)), `:adobe2021-alpine`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/alpine/Adobe2021.Dockerfile)) * `:[engine][version]-ubi9` - RHEL ubi9 versions of the image with warmed-up engines: `:lucee5-ubi9`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/ubi9/Lucee5.Dockerfile)), `:lucee-light-ubi9`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/ubi9/LuceeLight.Dockerfile)), `:adobe2018-ubi9`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/ubi9/Adobe2018.Dockerfile)), `:adobe2021-ubi9`([Dockerfile](https://github.com/Ortus-Solutions/docker-commandbox/blob/master/builds/ubi9/Adobe2021.Dockerfile)) -_*Note*: The `:latest` tag currently uses OpenJDK11, as do all other pre-built engine images. If you required JDK 8 support in your app or engine, use the `:jdk8` tag._ +_*Note*: The `:latest` tag currently uses OpenJDK11, as do all other pre-built engine images. If you required JDK 8 or JDK 17 support in your app or engine, use the `:jdk8` or `:jdk17` tags, respectively._ + +For references to the CommandBox versions used in various image versions, [please see the Changelog](https://github.com/Ortus-Solutions/docker-commandbox/blob/development/changelog.md). Description ================= @@ -173,20 +176,19 @@ To create your own, customized Docker image, use [our Dockerfile repository](htt ``` FROM ortussolutions/commandbox:lucee5 -ARG COUCHBASE_EMAIL -ARG COUCHBASE_LICENSE_KEY -ARG COUCHBASE_ACTIVATION_CODE +ARG REDIS_EMAIL +ARG REDIS_LICENSE_KEY +ARG REDIS_ACTIVATION_CODE + -# Copy Couchbase Extension into place for install -ADD http://lucee.ortussolutions.com/ext/couchbase-cache.lex $SERVER_HOME_DIRECTORY/WEB-INF/lucee-server/deploy/couchbase-cache.lex +# Install the Ortus Redis cache extension from Forgebox +RUN box install 5C558CC6-1E67-4776-96A60F9726D580F1 -# Seed Couchbase Extension License -ENV COUCHBASE_LICENSE_FILE $SERVER_HOME_DIRECTORY/WEB-INF/lucee-server/context/context/ortus/couchbase/license.properties -RUN touch "${CI_PROJECT_DIR}/build/license.properties" \ - && printf "email=${COUCHBASE_EMAIL}\n" >> ${COUCHBASE_LICENSE_FILE} \ - && printf "licenseKey=${COUCHBASE_LICENSE_KEY}\n" >> ${COUCHBASE_LICENSE_FILE} \ - && printf "activationCode=${COUCHBASE_ACTIVATION_CODE}\n" >> ${COUCHBASE_LICENSE_FILE} \ - && printf "serverType=Production\n" >> ${COUCHBASE_LICENSE_FILE} +# Scope in our args for extension activation +REDIS_EXTENSION_EMAIL=$REDIS_EMAIL +REDIS_EXTENSION_LICENSE_KEY=$REDIS_LICENSE_KEY +REDIS_EXTENSION_ACTIVATION_CODE=$REDIS_ACTIVATION_CODE +REDIS_EXTENSION_SERVER_TYPE=Production # WARM UP THE SERVER WITH THE NEW EXTENSION RUN ${BUILD_DIR}/util/warmup-server.sh @@ -240,7 +242,7 @@ Once your customized `Dockerfile` has has been built, you can run the generated #### Multi-Stage Builds -As of v3.0.0 of the image you can create multi-stage builds which include only a shell script to start the server, the RunWar servlet container, and the application/engine. This build is finalized, however, so the startup script will bypass all environmental and server evaluation in favor of the variables provided in the generated shell script. +As of v3.0.0 of the image you can create multi-stage builds which include only a shell script to start the server, the RunWar servlet container, and the application/engine. _This build is finalized, however, so the startup script will bypass all environmental and server evaluation in favor of the variables provided in the generated shell script._ This means that you will need to provide all secrets and variables needed by your server and CFConfig files during the initial build phase, as the `.env` and `.cfconfig.json` files will not be in play during the server startup. A finalized image reduces container startup times by up to 80% and reduces the final image size by up to 50%. Multi-stage builds are ideal for creating production images. The environment variable `FINALIZE_STARTUP`, when provided, will only generate the startup script. The script written is considered authoritative and will be used on the next container start. @@ -288,7 +290,7 @@ FROM ortussolutions/commandbox:lucee5 RUN export FINALIZE_STARTUP=true;$BUILD_DIR/run.sh;unset FINALIZE_STARTUP ``` -This created image will contain the authoritative script with its runtime benefits and caveats ( see above ). Unlike the multi-stage build above, however , secret expansion will take place prior to image start, with the caveat that any environment variables in existence when finalized script was generated will overwrite the runtime-provided variables or secrets. +This created image will contain the authoritative script with its runtime benefits and caveats ( see above ). Unlike the multi-stage build above, however , secret expansion will take place prior to image start, with the caveat that _any environment variables in existence when the finalized script was generated will overwrite the runtime-provided variables or secrets_. About CommandBox diff --git a/build/util/install-commandbox.sh b/build/util/install-commandbox.sh index db491cf..4186172 100755 --- a/build/util/install-commandbox.sh +++ b/build/util/install-commandbox.sh @@ -24,6 +24,9 @@ curl https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/comman # Set container in to single server mode box config set server.singleServerMode=true +# Set our log pattern to be ISO with timezone info, as containers might be running in different zones +box config set server.defaults.runwar.console.appenderLayoutOptions.pattern="[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n" + # Install GELF jar for Java.util JSON logging https://logging.paluch.biz/examples/jul-json.html mkdir -p $JAVA_HOME/classes curl http://search.maven.org/remotecontent?filepath=biz/paluch/logging/logstash-gelf/1.15.0/logstash-gelf-1.15.0.jar -o $JAVA_HOME/classes/logstash-gelf-1.15.0.jar diff --git a/builds/base/Alpine.Dockerfile b/builds/base/Alpine.Dockerfile index b007adc..990d7b4 100644 --- a/builds/base/Alpine.Dockerfile +++ b/builds/base/Alpine.Dockerfile @@ -61,9 +61,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/Alpine.JDK11.Dockerfile b/builds/base/Alpine.JDK11.Dockerfile index b1d4507..3dbbe3a 100644 --- a/builds/base/Alpine.JDK11.Dockerfile +++ b/builds/base/Alpine.JDK11.Dockerfile @@ -61,9 +61,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/Alpine.JDK17.Dockerfile b/builds/base/Alpine.JDK17.Dockerfile index d6ec3b7..2a6826c 100644 --- a/builds/base/Alpine.JDK17.Dockerfile +++ b/builds/base/Alpine.JDK17.Dockerfile @@ -61,9 +61,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/Dockerfile b/builds/base/Dockerfile index bcc0708..64ba7d4 100644 --- a/builds/base/Dockerfile +++ b/builds/base/Dockerfile @@ -57,9 +57,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/JDK11.Dockerfile b/builds/base/JDK11.Dockerfile index ba6afaa..3aff8da 100644 --- a/builds/base/JDK11.Dockerfile +++ b/builds/base/JDK11.Dockerfile @@ -57,9 +57,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/JDK17.Dockerfile b/builds/base/JDK17.Dockerfile index e10aa07..73c764d 100644 --- a/builds/base/JDK17.Dockerfile +++ b/builds/base/JDK17.Dockerfile @@ -57,9 +57,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/JDK8.Dockerfile b/builds/base/JDK8.Dockerfile index 3af6f16..29df1ea 100644 --- a/builds/base/JDK8.Dockerfile +++ b/builds/base/JDK8.Dockerfile @@ -54,9 +54,6 @@ RUN $BUILD_DIR/util/install-commandbox.sh ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/ubi9.Dockerfile b/builds/base/ubi9.Dockerfile index 34d49be..94859b8 100644 --- a/builds/base/ubi9.Dockerfile +++ b/builds/base/ubi9.Dockerfile @@ -61,9 +61,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/ubi9.JDK11.Dockerfile b/builds/base/ubi9.JDK11.Dockerfile index f1dec9e..8701000 100644 --- a/builds/base/ubi9.JDK11.Dockerfile +++ b/builds/base/ubi9.JDK11.Dockerfile @@ -60,9 +60,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/" diff --git a/builds/base/ubi9.JDK17.Dockerfile b/builds/base/ubi9.JDK17.Dockerfile index 191b957..f1c4142 100644 --- a/builds/base/ubi9.JDK17.Dockerfile +++ b/builds/base/ubi9.JDK17.Dockerfile @@ -60,9 +60,6 @@ ENV CLASSPATH="$JAVA_HOME/classes" ENV PORT 8080 ENV SSL_PORT 8443 -# Turn off the Undertow directory watcher by default to speed startup times -ENV BOX_SERVER_RUNWAR_ARGS="['--resource-manager-file-system-watcher=false','--log-pattern=[%p] %d{yyyy-MM-dd\'T\'HH:mm:ssXXX} %c - %m%n']" - # Healthcheck environment variables ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/"