Hey, folks! Is there a way to specify a Lucee vers...
# box-products
l
Hey, folks! Is there a way to specify a Lucee version when using the CommandBox Docker images? The changelog makes it look like the app server versions are fixed (e.g. entries like this:
Bumped :lucee5 server version to 5.3.8+189
If we can't specify a version, is there any ETA for getting Lucee 5.3.9 support?
s
ENV BOX_SERVER_APP_CFENGINE=lucee-light@5.3.9+141
👍 1
:lucee5
and most of those tags are pre-warmed images with specific versions of Lucee
If you drop that tag, you get the non-warmed version where you warm it up yourself and specify whatever you want, and then do the multi-stage build
l
Thanks! So I need the env var and I have to use the non-warmed version?
s
"warmed" means "we deployed a version of lucee already for you" so whatever you might specify would get ignored - it's only meaningful during the deployment/warming phase
You will then have to warm it up yourself
So if you're not currently doing that in your build process, that's a significant change, though it's not hard
l
We're not yet 😬
s
here's our current base Dockerfile:
Copy code
FROM ortussolutions/commandbox

# this just supresses some warnings we don't care about on Ubuntu or Debian-based images
ARG DEBIAN_FRONTEND=noninteractive

# Commandbox Version Override (optional)
# ENV COMMANDBOX_VERSION "5.3.4"

# Commandbox Installation - uncomment if we're ahead of the official images
# RUN rm /usr/local/bin/box && \
# $BUILD_DIR/util/install-commandbox.sh

# Install Commandbox modules we need for building, e.g. docker-lex-install
COPY ./build/box.json $APP_DIR
WORKDIR $APP_DIR

RUN box install

COPY ./build/lex /config/extensions

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

# LUCEE LIGHT list
ARG LUCEE_EXTENSIONS="CED6227E-0F49-6367-A68D21AACA6B07E8;name=Lucee Administrator;version=1.0.0.3,17AB52DE-B300-A94B-E058BD978511E39E;name=S3 Resource Extension;version=2.0.0.76-RC,87FE44E5-179C-43A3-A87B3D38BEF4652E;name=EHCache;version=2.10.0.32-SNAPSHOT,FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate ORM Engine;version=3.5.5.77,D46B46A9-A0E3-44E1-D972A04AC3A8DC10;name=Chart Extension;version=1.0.19.24,66E312DD-D083-27C0-64189D16753FD6F0;name=PDF Extension;version=1.1.0.7,FAD67145-E3AE-30F8-1C11A6CCF544F0B7;name=Form Tags;version=1.0.0.10,6E2CB28F-98FB-4B51-B6BE6C64ADF35473;name=Ajax Extension;version=1.0.0.4,8D7FB0DF-08BB-1589-FE3975678F07DB17;name=Compress Tags;version=1.0.0.7,B737ABC4-D43F-4D91-8E8E973E37C40D1B;name=Image extension;version=1.1.0.6-SNAPSHOT,37C61C0A-5D7E-4256-8572639BE0CF5838;name=ESAPI extension;version=2.2.4.7,60772C12-F179-D555-8E2CD2B4F7428718;name=Redis driver (BETA);version=3.0.0.33-BETA,99A4EF8D-F2FD-40C8-8FB8C2E67A4EEEB6;name=Microsoft SQL Server (Vendor Microsoft);version=8.4.1.jre8"
Copy code
ENV BOX_SERVER_APP_CFENGINE=lucee-light@5.3.9+141
#ENV BOX_SERVER_APP_CFENGINE=lucee-light@5.3.9-RC+129

# ARG DEBUG=1

# WARM UP THE SERVER

RUN ${BUILD_DIR}/util/warmup-server.sh

# RUN box config set modules.nerdvision.name="inLeague Default NerdVision App"
RUN box package uninstall --system docker-lex-install
that's used for all our apps. then we have our second stage build specific to each app we manage, like so:
Copy code
FROM (wherever your base image lives that you made in the previous step)

ENV FINALIZE_STARTUP true

COPY ./cfconfig/ ${LIB_DIR}/serverHome
COPY ./jars/ ${LIB_DIR}/serverHome/WEB-INF/lib/
COPY ./serverJars/ ${LIB_DIR}/serverHome/WEB-INF/lib/

COPY ./server.json ${APP_DIR}

ARG BOX_SERVER_cfconfigfile=${LIB_DIR}/serverHome/cfconfig-inleague.json

EXPOSE 8088

# finalization - applies cfconfig and server.json, then they are ignored
RUN $BUILD_DIR/run.sh
ENV FINALIZE_STARTUP false

# Debian Slim is the smallest OpenJDK image on that kernel, but we'll use ubuntu so it matches our DigitalOcean hosts; 'appbase' is based off of it but substitute your own

FROM <http://registry.inleague.io/inleague/inleague/appbase|registry.inleague.io/inleague/inleague/appbase> as app

ENV HEALTHCHECK_URI <http://127.0.0.1:8080/HealthCheck>

# set container tz
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata

# COPY our generated files

COPY --from=workbench /app /app
COPY --from=workbench /usr/local/lib/serverHome /usr/local/lib/serverHome

RUN mkdir -p /usr/local/lib/CommandBox/lib

COPY --from=workbench /usr/local/lib/CommandBox/lib/runwar*.jar /usr/local/lib/CommandBox/lib/
COPY --from=workbench /usr/local/bin/startup-final.sh /usr/local/bin/run.sh

CMD /usr/local/bin/run.sh
l
Awesome! Thanks!
@sknowlton do you guys use Docker in development? Does the dev Dockerfile differ from this one?
s
We do. The second one is different. The first one is the same
It's quite similar, actually. The difference is just in the server.json and cfconfig files that get copied in for the second one
l
Cool. FYI, this syntax works:
Copy code
ARG LUCEE_EXTENSIONS="\
CED6227E-0F49-6367-A68D21AACA6B07E8;name=Lucee Administrator;version=1.0.0.3,\
17AB52DE-B300-A94B-E058BD978511E39E;name=S3 Resource Extension;version=0.9.4.135,\
87FE44E5-179C-43A3-A87B3D38BEF4652E;name=EHCache;version=2.10.0.31,\
66E312DD-D083-27C0-64189D16753FD6F0;name=PDF Extension;version=1.1.0.7,\
8D7FB0DF-08BB-1589-FE3975678F07DB17;name=Compress Tags;version=1.0.0.7,\
B737ABC4-D43F-4D91-8E8E973E37C40D1B;name=Image extension;version=1.0.0.42,\
37C61C0A-5D7E-4256-8572639BE0CF5838;name=ESAPI extension;version=2.2.4.7,\
99A4EF8D-F2FD-40C8-8FB8C2E67A4EEEB6;name=Microsoft SQL Server (Vendor Microsoft);version=8.4.1.jre8\
"
Makes the file more readable and results in better diffs.
👍🏻 1