I’m trying to build a docker image while using a
server.json to specify a different webroot from
/app. Am I right in thinking that the pre-built images are already warmed up with a webroot of
/app and thus it’s too late to change?
When I examine the running image with
server show it shows the correct configuration from the
server.json, but it’s still actually serving from
I would recommend not using a prewarmed image. Honestly, the only use for those IMO is if you aren’t bulding a custom image at all and simply want to toss a volume mount in with your code and start up a container for a quick and dirty dev env. At the point that you have your own custom docker file and you’re customizing it, just use the vanilla base commandbox image.
The latest version of our image has a “single server mode” enabled which means you’re stuck with the warmed up server and everything about it including where it’s web root was. If you’re wanting to make your own image, then make your own image. There’s really no point in using the prewarmed ones at that point.
Appreciate the quick response (on a Friday evening, no less).
That makes perfect sense. I’ve gone back to the base image (alpine, actually) and gotten a working multi-stage build that’s about 20% the size of the full image and starts in the blink of an eye. Don’t think I can do better without using lucee-light and/or start pulling unnecessary modules out of the JDK.
Awesome to hear. A fully warmed (finalized) image starts in just a few seconds and is nice. From what I’ve seen Lucee Light and even the JDK with extra modules removed doesn’t provide a significant change in startup time. Just a few extra megs to transfer when pulling the image.