Skip to content

Commit

Permalink
fix for missing JRE 17 versions - which are in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed May 4, 2024
1 parent 7491991 commit 92f59e4
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
BUILD_IMAGE_TAG: jdk11
- BUILD_IMAGE_DOCKERFILE: builds/base/JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17
- BUILD_IMAGE_DOCKERFILE: builds/base/JRE17.Dockerfile
BUILD_IMAGE_TAG: jre17
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.JDK8.Dockerfile
BUILD_IMAGE_TAG: jdk8
- BUILD_IMAGE_DOCKERFILE: builds/debian/Lucee5.Dockerfile
Expand All @@ -46,6 +48,8 @@ jobs:
BUILD_IMAGE_TAG: jdk11-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/base/ubi9.JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/base/ubi9.JRE17.Dockerfile
BUILD_IMAGE_TAG: jre17-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/LuceeLight.Dockerfile
Expand All @@ -69,6 +73,8 @@ jobs:
BUILD_IMAGE_TAG: jdk11-alpine
- BUILD_IMAGE_DOCKERFILE: builds/base/Alpine.JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17-alpine
- BUILD_IMAGE_DOCKERFILE: builds/base/Alpine.JRE17.Dockerfile
BUILD_IMAGE_TAG: jre17-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.JDK8.Dockerfile
BUILD_IMAGE_TAG: jdk8-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Lucee5.Dockerfile
Expand Down
75 changes: 75 additions & 0 deletions builds/base/Alpine.JRE17.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
FROM eclipse-temurin:17-jre-alpine

ARG VERSION
ARG COMMANDBOX_VERSION

LABEL version ${VERSION}
LABEL maintainer "Jon Clausen <[email protected]>"
LABEL repository "https://github.com/Ortus-Solutions/docker-commandbox"

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

# Since alpine runs as a single user, we need to create a "root" direcotry
ENV HOME /root

# Alpine workgroup is root group
ENV WORKGROUP root

# Flag as an alpine release
RUN touch /etc/alpine-release

### Directory Mappings ###

# BIN_DIR = Where the box binary goes
ENV BIN_DIR /usr/bin
# LIB_DIR = Where the build files go
ENV LIB_DIR /usr/lib
WORKDIR $BIN_DIR

# APP_DIR = the directory where the application runs
ENV APP_DIR /app
WORKDIR $APP_DIR

# BUILD_DIR = WHERE runtime scripts go
ENV BUILD_DIR $LIB_DIR/build
WORKDIR $BUILD_DIR

# COMMANDBOX_HOME = Where CommmandBox Lives
ENV COMMANDBOX_HOME=$LIB_DIR/CommandBox

# Copy file system
COPY ./test/ ${APP_DIR}/
COPY ./build/ ${BUILD_DIR}/
# Ensure all workgroup users have permission on the build scripts
RUN chown -R nobody:${WORKGROUP} $BUILD_DIR
RUN chmod -R +x $BUILD_DIR


# Basic Dependencies including binaries for PDF rendering
RUN rm -rf $BUILD_DIR/util/debian
RUN rm -rf $BUILD_DIR/util/ubi9
RUN $BUILD_DIR/util/alpine/install-dependencies.sh

# Commandbox Installation
RUN $BUILD_DIR/util/install-commandbox.sh

# Add our custom classes added in the previous step to the java classpath
ENV CLASSPATH="$JAVA_HOME/classes"

# Default Port Environment Variables
ENV PORT 8080
ENV SSL_PORT 8443


# Healthcheck environment variables
ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/"

# Our healthcheck interval doesn't allow dynamic intervals - Default is 20s intervals with 15 retries
HEALTHCHECK --interval=20s --timeout=30s --retries=15 CMD curl --fail ${HEALTHCHECK_URI} || exit 1

EXPOSE ${PORT} ${SSL_PORT}

WORKDIR $APP_DIR

CMD $BUILD_DIR/run.sh
68 changes: 68 additions & 0 deletions builds/base/JRE17.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM eclipse-temurin:17-jre-jammy
ARG COMMANDBOX_VERSION

LABEL maintainer "Jon Clausen <[email protected]>"
LABEL repository "https://github.com/Ortus-Solutions/docker-commandbox"

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

# Since alpine runs as a single user, we need to create a "root" direcotry
ENV HOME /root

# Add a working group which any dynamic users can be assigned
ENV WORKGROUP runwar
RUN groupadd $WORKGROUP && usermod -a -G $WORKGROUP root

### Directory Mappings ###
# BIN_DIR = Where the box binary goes
ENV BIN_DIR /usr/local/bin
# LIB_DIR = Where the build files go
ENV LIB_DIR /usr/local/lib
WORKDIR $BIN_DIR

# BUILD_DIR = WHERE runtime scripts go
ENV BUILD_DIR $LIB_DIR/build
WORKDIR $BUILD_DIR

# COMMANDBOX_HOME = Where CommmandBox Lives
ENV COMMANDBOX_HOME=$LIB_DIR/CommandBox

# APP_DIR = the directory where the application runs
ENV APP_DIR /app
WORKDIR $APP_DIR

# Copy file system
COPY ./test/ ${APP_DIR}/
COPY ./build/ ${BUILD_DIR}/
RUN chmod +x $BUILD_DIR/*.sh

# Ensure all runwar users have permission on the build scripts
RUN chown -R $(whoami):${WORKGROUP} $BUILD_DIR


# Basic Dependencies
RUN rm -rf $BUILD_DIR/util/alpine
RUN rm -rf $BUILD_DIR/util/ubi9
RUN ${BUILD_DIR}/util/debian/install-dependencies.sh

# Commandbox Installation
RUN $BUILD_DIR/util/install-commandbox.sh

# Add our custom classes added in the previous step to the java classpath
ENV CLASSPATH="$JAVA_HOME/classes"


# Default Port Environment Variables
ENV PORT 8080
ENV SSL_PORT 8443

# Healthcheck environment variables
ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/"

# Our healthcheck interval doesn't allow dynamic intervals - Default is 20s intervals with 15 retries
HEALTHCHECK --interval=20s --timeout=30s --retries=15 CMD curl --fail ${HEALTHCHECK_URI} || exit 1

EXPOSE ${PORT} ${SSL_PORT}

CMD $BUILD_DIR/run.sh
72 changes: 72 additions & 0 deletions builds/base/ubi9.JRE17.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM eclipse-temurin:17-jre-ubi9-minimal

ARG COMMANDBOX_VERSION

LABEL maintainer "Jon Clausen <[email protected]>"
LABEL repository "https://github.com/Ortus-Solutions/docker-commandbox"

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

# Since alpine runs as a single user, we need to create a "root" direcotry
ENV HOME /root

RUN microdnf install -y shadow-utils util-linux

# Add a working group which any dynamic users can be assigned
ENV WORKGROUP runwar
RUN groupadd $WORKGROUP && usermod -a -G $WORKGROUP root

### Directory Mappings ###
# BIN_DIR = Where the box binary goes
ENV BIN_DIR /usr/local/bin
# LIB_DIR = Where the build files go
ENV LIB_DIR /usr/local/lib
WORKDIR $BIN_DIR

# BUILD_DIR = WHERE runtime scripts go
ENV BUILD_DIR $LIB_DIR/build
WORKDIR $BUILD_DIR

# COMMANDBOX_HOME = Where CommmandBox Lives
ENV COMMANDBOX_HOME=$LIB_DIR/CommandBox

# APP_DIR = the directory where the application runs
ENV APP_DIR /app
WORKDIR $APP_DIR

# Copy file system
COPY ./test/ ${APP_DIR}/
COPY ./build/ ${BUILD_DIR}/
RUN chmod +x $BUILD_DIR/*.sh

# Ensure all runwar users have permission on the build scripts
RUN chown -R $(whoami):${WORKGROUP} $BUILD_DIR


# Basic Dependencies
RUN rm -rf $BUILD_DIR/util/alpine
RUN rm -rf $BUILD_DIR/util/debian

RUN ${BUILD_DIR}/util/ubi9/install-dependencies.sh

# Commandbox Installation
RUN $BUILD_DIR/util/install-commandbox.sh

# Add our custom classes added in the previous step to the java classpath
ENV CLASSPATH="$JAVA_HOME/classes"

# Default Port Environment Variables
ENV PORT 8080
ENV SSL_PORT 8443


# Healthcheck environment variables
ENV HEALTHCHECK_URI "http://127.0.0.1:${PORT}/"

# Our healthcheck interval doesn't allow dynamic intervals - Default is 20s intervals with 15 retries
HEALTHCHECK --interval=20s --timeout=30s --retries=15 CMD curl --fail ${HEALTHCHECK_URI} || exit 1

EXPOSE ${PORT} ${SSL_PORT}

CMD $BUILD_DIR/run.sh

0 comments on commit 92f59e4

Please sign in to comment.