Failing to build a docker enviorment with CF-2023 images

Hi guys! Hope you are all doing well.

I´m having issues trying to build an enviroment using some of the images available at Docker Hub ( ortussolutions/commandbox:adobe2023-alpine, ortussolutions/commandbox:adobe2023-3.8.0 and ortussolutions/commandbox:adobe2023) all producing the same result:

What should I do to fix this? Trying to build this project with any CF-2021 works as expected.

My impression is that something in the CF-2023 version is blocking the script from creating the /usr/local/lib/CommandBox/lib directory.

This is the docker file that runs with it:

FROM ortussolutions/commandbox:adobe2023-alpine as workbench

Generate the startup script only

ENV FINALIZE_STARTUP true
RUN $BUILD_DIR/run.sh

Copy application files to root

COPY . /app/

Install our box.json dependencies (if you use coldbox)

#RUN cd /app && box install

Generate server-start.sh files

*** Don´t forget inform the release of CF, cfengine parameter ***

RUN box start cfengine=adobe@2023.0.4.330500 startScript=bash --console --dryRun --debug
#RUN box start startScript=bash --console --dryRun --debug

Listar arquivos do /app

RUN echo “Arquivos no diretório /app da imagem de build (workbench) :”
RUN echo $(ls -1 /app)

Debian Slim is the smallest OpenJDK image on that kernel. For most apps, this should work to run your applications

FROM adoptopenjdk/openjdk11:x86_64-ubuntu-jre-11.0.18_10 as app

RUN echo “Moving files from build image to deployable image…”

COPY our generated server-start

COPY --from=workbench /app/server-start.sh /usr/local/bin/server-start.sh
RUN chmod 744 /usr/local/bin/server-start.sh
COPY --from=workbench /app /app

RUN mkdir -p /usr/local/lib/CommandBox/lib
RUN mkdir -p /usr/local/lib/CommandBox/server/serverHome

Verify the specific runwar on the build image using the command : docker run -it ortussolutions/commandbox:adobe2018 bash

COPY --from=workbench /usr/local/lib/CommandBox/lib/runwar-4.7.7.jar /usr/local/lib/CommandBox/lib/runwar-4.7.7.jar
COPY --from=workbench /usr/local/lib/CommandBox/server/serverHome /usr/local/lib/CommandBox/server/serverHome
COPY --from=workbench /usr/local/lib/CommandBox/cfml /usr/local/lib/CommandBox/cfml

Install Adobe CF bundles

RUN cd /usr/local/lib/CommandBox/server/serverHome/adobe-2023.0.4.330500/WEB-INF/cfusion/bin && ./cfpm.sh install azureservicebus,websocket,pdf,print,report,exchange,oracle,htmltopdf,sharepoint,azureblob,scheduler,saml,debugger,mail,zip,image,spreadsheet,caching,adminapi,administrator

RUN echo “Everything is Ok! Starting the Server…”

Let´s start the Server

CMD /usr/local/bin/server-start.sh

Thanks in advance,
Vinicius Perdigão

Hey @vperdigao,

If you look at the actual error message, you see:

  1. A package script is trying to run mv PATH newPATH
  2. The PATH path is not found

I’m not the authority on those docker images but I strongly suspect the issue is with a package script in your box.json referencing a missing file/bad path. Could you show us the contents of your box.json?

Also, you are using the word “build”, but in a Docker context that would imply the issue is upon running docker build. I suspect you are getting this upon running the container, i.e. docker run, but I’m not sure. Could you confirm which command you are running (docker build or docker run) to get this error?

Hey Michael, I´m running a build (docker build . -t xxxxxx/cf_apis:1.0)

Just to execute a cleaner script I removed the box.json from this project and still got a file or directory not found:

Even tryied to tweek the mkdir command with full permissions (RUN mkdir -m 777 -p /usr/local/lib/CommandBox/lib and RUN mkdir -m 777 -p /usr/local/lib/CommandBox/server/serverHome) and still got the same error.