Question about Lucee and Docker, especially about ...
# lucee
h
Question about Lucee and Docker, especially about installing extensions. My goal is to install the newest MySQL extension by using Lucee_extensions ID:
Copy code
FROM lucee/lucee:5.4.3.16-nginx-tomcat9.0-jdk11-temurin-focal

# List default Lucee extension IDs
# <https://download.lucee.org/>
...
#   7E673D15-D87C-41A6-8B5F1956528C605F = MySQL
ENV LUCEE_EXTENSIONS="\
7E673D15-D87C-41A6-8B5F1956528C605F\
"
Unfortunately Lucee always uses MySQL 8.0.33 instead of 8.1.0 - so it seems that my ID is not working? Somebody knows what could be the cause?
I am also replacing lucee-server.xml in my docker file: # Replace Lucee server config COPY ./lucee-server.xml /opt/lucee/server/lucee-server/context/ There I also define the driver with version 8.1.0: <rhextension categories="Datasource" file-name="1hg3fjbz6dzdq.lex" id="7E673D15-D87C-41A6-8B5F1956528C605F" jdbc="[{'label':'MySQL','id':'mysql','connectionString':'jdbcmysql//{host}:{port}/{database}','class':'com.mysql.cj.jdbc.Driver','bundleName':'com.mysql.cj','bundleVersion':'8.1.0'}]" lucee-core-version="5.0.0.019-" name="MySQL" release-type="all" start-bundles="false" trial="false" version="8.1.0"/>
c
Does specifying the version make any difference?
ENV LUCEE_EXTENSIONS="7E673D15-D87C-41A6-8B5F1956528C605F;name=MySQL;version=8.1.0"
h
Thanks, will try
d
☝️
I was just about to say the same thing. That is how we do it and we’ve had success with it.
h
Crazy, still doesn't work
d
Weird. What is the string you used exactly?
h
The string mentioned in this thread
Maybe I could try to copy the Lex file
d
You don’t by chance have a .env file with LUCEE_EXTENSIONS in it somewhere or something that is overwriting what you are putting in the Dockerfile? (Not that that has ever happened to me 😄 )
h
Will check, don‘t think so
g
Also check your server.json file. I had exactly the same issue as you, only to find that I had it defined in multiple places.
h
So I found the issue, but am not sure how to solve it: This is the offending line in my Docker file # Replace Lucee server config COPY ./lucee-server.xml /opt/lucee/server/lucee-server/context/ If I remove this line, the extensions are installed with the correct version. I also tried to change the <extensions> setting or empty this setting, still no chance: When this line is used and the file is copied, then my extensions are not in the correct version.
This also doesn't work # Replace Lucee server config COPY ./lucee-server.xml /opt/lucee/server/lucee-server/context/ # Copy MySQL extension COPY ./com.mysql.cj-8.1.0.lex /opt/lucee/server/lucee-server/deploy/
g
Are you using CommandBox at all? Do you have a CommandBox server.json file? that is overwriting the lucee-server.xml?
h
I dont use Commandbox. But found an easy solution: Switched to the Lucee Nginx light image without extensions. Now everything works, my extensions are installed with the correct version. Thanks for your help
👍🏼 1