Hi Everyone, I just upgrade my docker-commandbox i...
# box-products
c
Hi Everyone, I just upgrade my docker-commandbox image uisng jdk11-3.7.0 with commandbox version 5.8.0 in my dockerFile I have a script > RUN ls -l ${BOX_SERVER_APP_SERVERHOMEDIRECTORY}/WEB-INF/lucee-server/context/context/ortus/redis/ with this lates commandbos I always get error : ls: cannot access '/root/serverHome/WEB-INF/lucee-server/context/context/ortus/redis/': Operation not permitted with docker-commandbox image uisng jdk11-3.6.0 commandbox version 5.6.1 is fine, the ls script still can be run. any idea what this problem ?
b
@jclausen can you assist?
j
I would have to know where that is being run in the Dockerfile. That environment variable doesn’t get set until runtime, which allows you to customize the server home directory on initial startup. So, if you want to use the convention route, you would want to do the following before running that command:
Copy code
ENV BOX_SERVER_APP_SERVERHOMEDIRECTORY ${LIB_DIR}/serverHome
RUN mkdir -p ${BOX_SERVER_APP_SERVERHOMEDIRECTORY}/WEB-INF/lucee-server/context/context/ortus/redis
Also, the above assumes you are using a pre-warmed image ( e.g.
ortussolutions/commandbox:lucee5
). If you are not, you would need to warm up the server before you create that ortus redis extension directory. Otherwise it will get wiped out when the server WAR explodes.
c
Hi @jclausen FYI, I have do the same in my dockerFIle like :
Copy code
ENV BOX_SERVER_APP_SERVERHOMEDIRECTORY 
RUN mkdir -p ${BOX_SERVER_APP_SERVERHOMEDIRECTORY}/WEB-INF/lucee-server/context/context/ortus/redis
the strange is with jdk11-3.6.4 is fine
right now, I have to remove step RUN ls -l ... if I use image jdk11-3.7.0
actually in that step I only want to copy the redis license, anf after the use ls to list it just want to make sure the license is there.
Copy code
RUN mkdir -p ${BOX_SERVER_APP_SERVERHOMEDIRECTORY}/WEB-INF/lucee-server/context/context/ortus/redis/
COPY ./build/env/${CI_ENVIRONMENT_NAME}/license/redis/ ${BOX_SERVER_APP_SERVERHOMEDIRECTORY}/WEB-INF/lucee-server/context/context/ortus/redis/
j
Copy code
ENV BOX_SERVER_APP_SERVERHOMEDIRECTORY
That would be declaring it as empty. It should be:
Copy code
ENV BOX_SERVER_APP_SERVERHOMEDIRECTORY ${LIB_DIR}/serverHome
c
ah ok, I will try this
when I check I already set the ENV var to
BOX_SERVER_APP_SERVERHOMEDIRECTORY: /root/serverHome
j
That works, as long as you are not using a pre-warmed image version.