How to create a basic docker image for Lucee 5.2 for ubuntu?


#21

Great insights into docker and containerization, Justin, thank you.

In the meantime, I ran into docker networking with its host issue with my second VM, please see my post today at cfml.slack.com


#22

Understanding your first point about variable mileage, how much RAM does a typical host server have and how much of it do you typically assign to each container’s JVM (what sort of range)?


#23

For that example, a server with 16GB RAM – so a bunch of apps that might use anything from 512MB RAM to 1GB RAM in various combinations :slight_smile:

But again every app is different, if you had a bunch of apps that could run with a 128MB JVM then you might be able to fit 30 or 40 containers within the same sized hosts. The number of containers is not really too much of a problem, it’s the profile of how your apps run and how many resources they require.


#24

Thanks Justin. I’m interested in what the minimum RAM for a JVM running Lucee in a container might be before taking the app’s requirements into consideration. Would 128MB really be feasible? Sounds like 256 or even 512 is closer to the baseline.


#25

If you used plain Lucee with Tomcat as a base image the memory requirements are basically just what you allocate to the JVM. Lucee and a basic app could happily run on ~64mb RAM. (Side note: I believe the current initial JVM size is 256 but you can change it with an environment variable, and in the next iteration of the Lucee Docker images it will be 64 again which matches the other distribution packages. You should always customise for your apps though, combined with other JVM settings).

If you used the lucee-nginx base image then add a couple of tens of megabytes of RAM for nginx and supervisor. A very small price to pay for a small, fast and powerful webserver.

I’m sure LXC for running the containers and the Docker daemon add a few more megabytes of overhead, but IMO it’s insignificant enough not to worry about it :slight_smile: