# Docker build WARMUP behaviour

**URL:** <https://dev.lucee.org/t/docker-build-warmup-behaviour/17547>\
**Category:** support\
**Created:** [September 16, 2026, 2:34am UTC](https://dev.lucee.org/t/docker-build-warmup-behaviour/17547 "2026-09-16T02:34:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philsw](https://dev.lucee.org/letter_avatar_proxy/v4/letter/p/a183cd/32.png) [@philsw](https://dev.lucee.org/u/philsw)\
**Post date:** [September 16, 2026, 2:34am UTC](https://dev.lucee.org/t/docker-build-warmup-behaviour/17547/1 "2026-09-16T02:34:12Z")

</div>

Hi everyone,

We’ve been migrating our Docker builds to use Lucee 7’s native build-time warmup (LUCEE\_ENABLE\_WARMUP=true) combined with Server.cfc:onBuild() (introduced in LDEV-4922  
) to pre-cache Maven dependencies declared in javaSettings / mavenLoad().

We build our own Tomcat container starting from stock Apache Tomcat and downloading lucee-light-7.0.5.41.jar directly. We noticed an interesting lifecycle behavior:

Steps to reproduce:

Fresh container with Tomcat and lucee-light-7.0.5.41.jar in lucee/ (no existing /opt/lucee/server/lucee-server/ state on disk).  
Place Server.cfc at /opt/lucee/server/lucee-server/context/context/Server.cfc containing an onBuild() function.  
Run Tomcat with LUCEE\_ENABLE\_WARMUP=true /usr/local/tomcat/bin/catalina.sh run.  
Observation:

On the first run, the lucee-light bootstrap loader contacts [download.lucee.org](http://download.lucee.org), downloads 7.0.5.41.lco, unzips bundles, and terminates. Server.cfc:onBuild() is never invoked.  
On a second consecutive run (LUCEE\_ENABLE\_WARMUP=true catalina.sh run), 7.0.5.41.lco is now already present on disk. The engine starts up, triggers CFMLEngineImpl$OnStart, and Server.cfc:onBuild() executes cleanly.  
Why this happens: On a cold filesystem with lucee-light, the loader is responsible for fetching the .lco patch. Because the core engine is not yet present at initial startup, the full CFML engine lifecycle (which initializes PageContext and dispatches onBuild()) does not run on pass 1 before the warmup exit hook shuts down Felix.

Question / Suggestion: For users authoring slim containers with lucee-light.jar, is running a two-pass warmup in the Dockerfile the expected pattern, or should the lucee-light loader chain directly into the core engine startup once .lco extraction finishes during warmup?

Thanks!

---

<div class="post-metadata">

**Author:** ![micstriit](https://dev.lucee.org/user_avatar/dev.lucee.org/micstriit/32/26_2.png) [@micstriit](https://dev.lucee.org/u/micstriit)\
**Post date:** [September 24, 2026, 5:14am UTC](https://dev.lucee.org/t/docker-build-warmup-behaviour/17547/2 "2026-09-24T05:14:56Z")

</div>

Thanks for the clear write-up — agreed, this is a bug. With lucee-light, the first warmup pass only fetches the `.lco` and exits, so `onBuild()` never runs until a second start.

Tracked here: [LDEV-6472](https://luceeserver.atlassian.net/browse/LDEV-6472)

Until that’s fixed, workarounds are: run warmup twice in the Dockerfile, use the full `lucee.jar` instead of `lucee-light`, or pre-place the matching `.lco` so the first pass starts the engine.

---

<div class="post-metadata">

**Author:** ![philsw](https://dev.lucee.org/letter_avatar_proxy/v4/letter/p/a183cd/32.png) [@philsw](https://dev.lucee.org/u/philsw)\
**Post date:** [October 20, 2026, 1:18pm UTC](https://dev.lucee.org/t/docker-build-warmup-behaviour/17547/3 "2026-10-20T13:18:22Z")

</div>

@GianTschingt wanna take a crack at the fix for this one? 😃 you already suggested an approach in the jira ticket

---

<div class="post-metadata">

**Author:** ![GianTschingt](https://dev.lucee.org/user_avatar/dev.lucee.org/giantschingt/32/9300_2.png) [@GianTschingt](https://dev.lucee.org/u/GianTschingt)\
**Post date:** [October 20, 2026, 3:24pm UTC](https://dev.lucee.org/t/docker-build-warmup-behaviour/17547/4 "2026-10-20T15:24:21Z")

</div>

Thanks @philsw. I tracked this down: it isn’t the warmup itself. On a clean server directory, compiling `Server.cfc` failed because the base `Component.cfc` wasn’t deployed yet (LDEV-6481), and that error was silently swallowed, so `onBuild()` was skipped. The second pass worked because the base component was there by then. This is already fixed in 7.1.2.100+ and 7.0.6.10+, where a single warmup pass runs `onBuild()`. With [LDEV-6472](https://luceeserver.atlassian.net/browse/LDEV-6472) we’ll also log such listener failures from now on, instead of hiding them.
