Commandbox cannot start lucee server when starting via GitLab CI/CD

Hi,
In my latest endavour to implement automatic testing in my project I am getting stuck when I try to start a lucee server via commandbox.
I am in the process of implementing automatic test in my GitLab CI/CD with testbox and cypress.
My plan is to use 2 “services” as gitlab calls them to host a database that will be initialized with testdata and another as the primary webserver.
As I am using Commandbox locally for my development server and my test runs my thought was that it would be ideal to use the commandbox Docker image as a base for this.

GitLab CI Config
api-test:
    stage: test
    needs: []
    image: ortussolutions/commandbox:alpine-3.9.2
    inherit:
        default: false
    rules:
        - if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "web"
    services:
        - name: mariadb:latest
          alias: testing-database
          variables:
              MYSQL_ROOT_PASSWORD: TestboxDatabaseAdmin
              MYSQL_ROOT_HOST: '%'
              MYSQL_LOG_CONSOLE: true
              MYSQL_DATABASE: content-db
          entrypoint:
              - '/bin/bash'
              - '-c'
              - |
                  # wait for project clone/checkout
                  # i'm relying on git index to indicate the clone/checkout is done
                  until [ -f "$CI_PROJECT_DIR/.git/index" ]; do sleep 1; done;
                  # especially after the lock file has been removed
                  while [ -f "$CI_PROJECT_DIR/.git/index.lock" ]; do sleep 1; done;
                  # copy/setup database init scripts as you need
                  cp "$CI_PROJECT_DIR/_devTools/database-structure.sql" /docker-entrypoint-initdb.d/01-database-structure.sql
                  cp "$CI_PROJECT_DIR/_devTools/database-testdata.sql" /docker-entrypoint-initdb.d/02-database-testdata.sql
                  # pass control to the default image entrypoint
                  exec /usr/local/bin/docker-entrypoint.sh "$@"
                  # arg $0 should be explicitly passed when using 'bash -c' entrypoints
              - '/bin/bash'
          command:
              - 'mariadbd'
        - name: ortussolutions/commandbox:alpine-3.9.2
          alias: testing-webserver
          variables:
              box_server_openBrowser: false
              box_server_web_host: 0.0.0.0
              box_server_web_http_port: 8080
              box_server_env_DB_HOST: testing-database
              box_server_env_DB_PORT: 3306
              box_server_env_DB_CONNECTIONSTRING: jdbc:mysql://testing-database:3306/content-db?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useLegacyDatetimeCode=true
          entrypoint:
              - '/bin/bash'
              - '-c'
              - |
                  # wait for project clone/checkout
                  # i'm relying on git index to indicate the clone/checkout is done
                  until [ -f "$CI_PROJECT_DIR/.git/index" ]; do sleep 1; done;
                  # especially after the lock file has been removed
                  while [ -f "$CI_PROJECT_DIR/.git/index.lock" ]; do sleep 1; done;
                  # copy/setup WebRoot into app folder - > we wont manipulate any files this way
                  rm -rf /app/*
                  cp -a "$CI_PROJECT_DIR/." /app
                  # start the lucee server
                  box server start testing-server.json --verbose --console --debug
    variables:
        testingWebserver: "http://testing-webserver:8080"
    script:
        - ./_devTools/waitForServer.sh $testingWebserver
        - box testbox run runner="$testingWebserver/tests/runner.cfm"
Testing-Server.json
{
    "name":"Testing",
    "openBrowser":true,
    "openBrowserURL":"http://localhost:8761/tests/runner.cfm",
    "debug":true,
    "profile":"development",
    "dockEnable":false,
    "trayEnable":false,
    "env":{
        "APPNAME":"TEST",
        "ENVIRONMENT":"testing",
        "CFCONFIG_ADMINPASSWORD":"TestboxAdmin",
        "COLDBOX_REINITPASSWORD":"TestboxReinit",
        "COLDBOX_SESSION_TIMEOUT":15,
        "ORM_DIALECT":"org.hibernate.dialect.MySQL5InnoDBDialect",
        "ORM_LOGSQL":false,
        "ORM_SECONDARY_CACHE":false,
        "DB_DRIVER":"MySQL",
        "DB_CLASS":"com.mysql.cj.jdbc.Driver",
        "DB_BUNDLEVERSION":"8.0.24",
        "DB_BUNDLENAME":"com.mysql.cj",
        "DB_HOST":"localhost",
        "DB_PORT":"8760",
        "DB_CONNECTIONSTRING":"jdbc:mysql://localhost:8760/content-db?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useLegacyDatetimeCode=true",
        "DB_DATABASE":"content-db",
        "DB_USER":"root",
        "DB_PASSWORD":"TestboxDatabaseAdmin",
        "DB_DATASOURCE":"contentbox",
        "JWT_SECRET":"....",
        "LUCEE_EXTENSIONS":"FAD1E8CB-4F45-4184-86359145767C29DE"
    },
    "app":{
        "cfengine":"lucee@5.4.5"
    },
    "web":{
        "host":"127.0.0.1",
        "directoryBrowsing":false,
        "http":{
            "port":"8761"
        },
        "rewrites":{
            "enable":true
        }
    },
    "JVM":{
        "heapSize":"4G",
        "javaVersion":"openjdk11"
    }
}`

I noticed that the testbox runner was not able to contact the testing-webserver. I added a shell script that checks if the testing-webserver is available every 5 seconds and continues the processing after or fails if the lucee server has not become available after a certain time.
After this I discovered that the testing-webserver failed to start with the error:

Cannot run program “/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java”: error=2, No such file or directory
caused by: java.io.IOException
Cannot run program “/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java”: error=2, No such file or directory
caused by: java.io.IOException
error=2, No such file or directory

waitForServer.sh
#!/bin/bash

testingWebserver=${1:-http://testing-webserver:8080}
maxAttempts=${2:-30}
waitTime=${3:-5}
attemptCounter=0
echo "Waiting for webserver to respond"
until $( curl --output /dev/null --silent --head --fail $testingWebserver ); do
    if [ "${attemptCounter}" -eq "${maxAttempts}" ]; then
        echo "Max attempts to contact testing webserver reached!"
        exit 1
    fi

    printf '.'
    attemptCounter=$((attemptCounter+1))
    sleep "$waitTime"
done
echo "Server responded, will continue now"
``

If I install openjdk before the server start via box server java install openjdk I will get the same result.
After the installation of openjedk I checked via ls if the path was existing, which it was.

I tried to reproduce the issue by creating a docker-compose file to run the servers on my local machine and have a chance to look into the logs.
However I was not able to reproduce the error his way.

docker-compose.yml

``
services:
testing-database:
image: mariadb:latest
container_name: testing-database
environment:
MYSQL_ROOT_PASSWORD: TestboxDatabaseAdmin
MYSQL_ROOT_HOST: ‘%’
MYSQL_LOG_CONSOLE: true
MYSQL_DATABASE: content-db
volumes:
- ./database-structure.sql:/docker-entrypoint-initdb.d/01-database-structure.sql
- ./database-testdata.sql:/docker-entrypoint-initdb.d/01-database-testdata.sql
testing-webserver:
depends_on:
- testing-database
image: ortussolutions/commandbox:alpine-3.9.2
container_name: testing-webserver
environment:
box_server_openBrowser: false
box_server_web_host: 0.0.0.0
box_server_web_http_port: 8080
box_server_env_DB_HOST: testing-database
box_server_env_DB_PORT: 3306
box_server_env_DB_CONNECTIONSTRING: jdbc:mysql://testing-database:3306/content-db?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useLegacyDatetimeCode=true
volumes:
- …/:/app/
ports:
- “8769:8080”
entrypoint:
- ‘/bin/bash’
- ‘-c’
- |
pwd
whoami
box server start testing-server.json --console --debug
command:
- “”
testbox-server:
depends_on:
- testing-webserver
image: ortussolutions/commandbox:jdk11-alpine-3.9.2
container_name: testbox-server
volumes:
- ./waitForServer.sh:/app/waitForServer.sh
environment:
testingWebserver: “http://testing-webserver:8080
entrypoint:
- ‘/bin/bash’
- ‘-c’
- |
ping -c 4 testing-webserver
/app/waitForServer.sh http://testing-webserver:8080
box testbox run runner=“http://testing-webserver:8080/tests/runner.cfm”`

Background to my project:
The project contains a contentbox installation including testbox.
My feeling is that this is either a really dumb error on my end, or something specific with the way gitlab is working with the containers.

I’ve never used a service for CommandBox, but you need to find how to get the logs for that container. It would seem CommandBox auto-installed a JRE /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9 but the folder is no longer there. I would question why you’re doing that though-- just use the JRE already in the docker container. It’s sort of wasted effort to be downloading a JRE when the container starts. Also, you have your heap set to 4 gigs-- is that much RAM even available in CI?

    "JVM":{
        "heapSize":"4G",
        "javaVersion":"openjdk11"
    }

You shouldn’t need to use services at all in your Gitlab test phase for CommandBox ( though you can use a service to supply the database ). Gitlab allows you to use a Docker image for a build step/job. Here’s a very basic sample TestBox job using the the commandbox image:

testbox:
  image: ortussolutions/commandbox:latest
  stage: tests
  except:
    variables:
      - $CI_COMMIT_MESSAGE =~ /skip-tests/
      - $SKIP_TESTS =~ /true/
  script:
    # Run Tests and create results folder
    - mkdir -p tests/results
    - box config set endpoints.forgebox.APIToken=${FORGEBOX_API_TOKEN}
    - box install
    - box config set server.singleServerMode=false
    - box server start
    # Sleep for 30 s to make sure the server is up and extensions are installed
    - sleep 30
    # run the tests 
    - box testbox run http://127.0.0.1:8080/tests/runner.cfm?reporter=text
  after_script:
    - cat `box system-log`

@bdw429s I was able to acces the log files of the server.
I noticed previously that commandbox seems to install the JRE during the startup process, that is why I tried to install the jre before the server start. My hope was to test if the folder is existing or not. After the insallation of the jre it was existing (and Commandbox found it during the server startup).

Gitlab and the runner are self hosted. Memor should not be a problem as more then 4 times the memory are available to that machine. I changed the setting to 0.5Gig for testing regardless.

@jclausen I will try that. However I need the lucee server as a service for another testcase that cannot be executed from the commandbox image. My thought was to setup the service now, so that I can reuse the setup later.

Logs with jre installation

Executed Commands

# wait for project clone/checkout
# i'm relying on git index to indicate the clone/checkout is done
until [ -f "$CI_PROJECT_DIR/.git/index" ]; do sleep 1; done;
# especially after the lock file has been removed
while [ -f "$CI_PROJECT_DIR/.git/index.lock" ]; do sleep 1; done;
# copy/setup database init scripts as you need
rm -rf /app/*
cp -a "$CI_PROJECT_DIR/." /app
# pass control to the default image entrypoint
box server java install openjdk11
echo "list /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin contents:"
ls /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin
box server start testing-server.json --verbose --console --debug

logs

 √ | Installing package [java:openjdk11:lockVersion]

Java 11.0.22 (Eclipse Adoptium)   (Default)
  /opt/java/openjdk/
  This is the Java installation in use by the CLI, it cannot be removed.

openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9
  AdoptOpenJDK
  https://adoptium.net/

To set a different default Java version for your servers, run: 
  server java setDefault openjdk11
list /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin contents:
jaotc
java
jfr
jjs
jrunscript
keytool
pack200
rmid
rmiregistry
unpack200
 × | Starting Server
   | > Cannot run program "/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java": error=2, No such file or directory
   |------------------------------
   | Looking for server JSON file by convention: /app/testing-server.json
   | webroot defaulted to location of server's JSON file: /app/
   | Site name - Testing
   | Webroot - /app/
   | Site config file - /app/testing-server.json
   | Contacting ForgeBox to determine the latest & greatest version of [lu
   | cee 5.4.5]...  Use an exact 'cfengine' version to skip this check
   | OK, [lucee 5.4.5+23] it is!
   | Exploding WAR/zip archive...
   | Server start command: 
   |     /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jd
   | k-11.0.23+9/bin/java
   |     -Xmx512M 
   |     -cp /usr/lib/CommandBox/lib/runwar-5.0.0.jar runwar.Start /usr/li
   | b/CommandBox/server/serverHome/lucee-5.4.5.23/serverInfo.jso
   |------------------------------
   | √ | Overriding server.json values from env vars
   |   |----------------------------------------------------------
   |   | Overridding [openBrowser] with OS environment variable [box_server_op
   |   | enBrowser
   |   | Overridding [env.DB.PORT] with OS environment variable [box_server_en
   |   | v_DB_PORT
   |   | Overridding [env.DB.HOST] with OS environment variable [box_server_en
   |   | v_DB_HOST
   |   | Overridding [web.http.port] with OS environment variable [box_server_
   |   | web_http_port
   |   | Overridding [JVM.heapSize] with OS environment variable [box_server_J
   |   | VM_heapSize
   |   | Overridding [web.host] with OS environment variable [box_server_web_h
   |   | ost
   |   | Overridding [env.DB.CONNECTIONSTRING] with OS environment variable [b
   |   | ox_server_env_DB_CONNECTIONSTRING
   |   |----------------------------------------------------------
   | √ | Installing package [java:openjdk11:lockVersion]
   |   | Installing [openjdk11]
   |   | Java version:              openjdk11
   |   | Java type:                 jre
   |   | Java arch:                 x64
   |   | Java os:                   linux
   |   | Java jvm-implementation:   hotspot
   |   | Java release:              latest
   |   | Hitting the Adoptium API to find your download.
   |   | https://api.adoptium.net/v3/assets/version/%5B11%2C12%29?page_size=10
   |   | 00&release_type=ga&vendor=eclipse&project=jdk&heap_size=normal&jvm_im
   |   | pl=hotspot&os=linux&architecture=x64&image_type=j
   |   | Exact version is [openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9]
   |   | Lucky you, we found this version of Java in local artifacts!
   |   | The package openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9 is already 
   |   | installed at /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_h
   |   | otspot_jdk-11.0.23+9. Skipping installation. Use --force option to fo
   |   | rce insta
   | √ | Setting site [Testing] Profile to [development]
   |   |---------------------------------------------------------------------------
   |   | Profile set from profile property in server.json
   |   | Block CF Admin disabled
   |   | Block Sensitive Paths enabled
   |   | Block Flash Remoting enabled
   |   | Directory Browsing disabled
   |   | File Caching disabled
   |   |---------------------------------------------------------------------------
   | √ | Installing package [forgebox:lucee@5.4.5]
   |   | Verifying package 'lucee' in forgebox, please wait...
   |   | Installing version [5.4.5+23].
   |   | Verified entry in forgebox: 'lucee'
   |   | Deferring to [https] endpoint for forgebox entry [lucee]...
   |   | Downloading [HTTPS://downloads.ortussolutions.com/lucee/lucee/5.4.5.2
   |   | 3/cf-engine-5.4.5.23.zip
   |   | Decompressing...
   |   | Storing download in artifact cache...
   |   | Done.
   |   | Installing to: /usr/lib/CommandBox/temp/97EED166-7AE6-43E3-8D437579F9
   |   | F288A
   |   | -> 2 File(s) Installed
   |   | -> 0 File(s) ignored
   |   | Eureka, 'lucee@5.4.5' has been installed!
   | √ | Loading CFConfig into server
   |   |-------------------------------------------
   |   | Found CFConfig JSON in ".cfconfig.json" file in web root by conventio
   |   | n
   |   | Importing luceeserver config from [/app/.cfconfig.json]
   |   | Config transferred from /app/.cfconfig.json!
   |   | Found box environment variable [CFCONFIG_ADMINPASSWORD]
   |   | Importing into [luceeserver]...
   |   | [ADMINPASSWORD] set.
   |   | No Web context admin password found. Setting your admin password to t
   |   | he same as your Server context password
   |   | [adminPassword] set.
   |   |-------------------------------------------



ERROR (6.0.0+00787)

Cannot run program "/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java": error=2, No such file or directory
  caused by: java.io.IOException
  Cannot run program "/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java": error=2, No such file or directory
    caused by: java.io.IOException
    error=2, No such file or directory


/system/services/ServerService.cfc: line 1578
1576: 	    processBuilder.redirectErrorStream( true );
1577: 	    // Kick off actual process
1578: 	    variables.process = processBuilder.start();
1579: 
1580: 		// She'll be coming 'round the mountain when she comes...
called from /system/modules_app/server-commands/commands/server/start.cfc: line 173
called from /system/services/CommandService.cfc: line 443
called from /system/services/CommandService.cfc: line 245
called from /system/Shell.cfc: line 862
called from /system/Bootstrap.cfm: line 124

To enable full stack trace, run config set verboseErrors=true
Logs without jre installation

Executed Commands

# wait for project clone/checkout
# i'm relying on git index to indicate the clone/checkout is done
until [ -f "$CI_PROJECT_DIR/.git/index" ]; do sleep 1; done;
# especially after the lock file has been removed
while [ -f "$CI_PROJECT_DIR/.git/index.lock" ]; do sleep 1; done;
# copy/setup database init scripts as you need
rm -rf /app/*
cp -a "$CI_PROJECT_DIR/." /app
# pass control to the default image entrypoint
echo "list /usr/lib/CommandBox/serverJREs contents:"
ls /usr/lib/CommandBox/serverJREs
box server start testing-server.json --verbose --console --debug

Logs

list /usr/lib/CommandBox/serverJREs contents:
box.json
 × | Starting Server
   | > Cannot run program "/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java": error=2, No such file or directory
   |------------------------------
   | Looking for server JSON file by convention: /app/testing-server.json
   | webroot defaulted to location of server's JSON file: /app/
   | Site name - Testing
   | Webroot - /app/
   | Site config file - /app/testing-server.json
   | Contacting ForgeBox to determine the latest & greatest version of [lu
   | cee 5.4.5]...  Use an exact 'cfengine' version to skip this check
   | OK, [lucee 5.4.5+23] it is!
   | Exploding WAR/zip archive...
   | Server start command: 
   |     /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jd
   | k-11.0.23+9/bin/java
   |     -Xmx512M 
   |     -cp /usr/lib/CommandBox/lib/runwar-5.0.0.jar runwar.Start /usr/li
   | b/CommandBox/server/serverHome/lucee-5.4.5.23/serverInfo.jso
   |------------------------------
   | √ | Overriding server.json values from env vars
   |   |----------------------------------------------------------
   |   | Overridding [openBrowser] with OS environment variable [box_server_op
   |   | enBrowser
   |   | Overridding [env.DB.PORT] with OS environment variable [box_server_en
   |   | v_DB_PORT
   |   | Overridding [env.DB.HOST] with OS environment variable [box_server_en
   |   | v_DB_HOST
   |   | Overridding [web.http.port] with OS environment variable [box_server_
   |   | web_http_port
   |   | Overridding [JVM.heapSize] with OS environment variable [box_server_J
   |   | VM_heapSize
   |   | Overridding [web.host] with OS environment variable [box_server_web_h
   |   | ost
   |   | Overridding [env.DB.CONNECTIONSTRING] with OS environment variable [b
   |   | ox_server_env_DB_CONNECTIONSTRING
   |   |----------------------------------------------------------
   | √ | Installing package [java:openjdk11:lockVersion]
   |   | Installing [openjdk11]
   |   | Java version:              openjdk11
   |   | Java type:                 jre
   |   | Java arch:                 x64
   |   | Java os:                   linux
   |   | Java jvm-implementation:   hotspot
   |   | Java release:              latest
   |   | Hitting the Adoptium API to find your download.
   |   | https://api.adoptium.net/v3/assets/version/%5B11%2C12%29?page_size=10
   |   | 00&release_type=ga&vendor=eclipse&project=jdk&heap_size=normal&jvm_im
   |   | pl=hotspot&os=linux&architecture=x64&image_type=j
   |   | Exact version is [openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9]
   |   | Redirecting to: 'https://github.com/adoptium/temurin11-binaries/relea
   |   | ses/download/jdk-11.0.23%2B9/OpenJDK11U-jre_x64_linux_hotspot_11.0.23
   |   | _9.tar.gz'.
   |   | Redirecting to: 'https://objects.githubusercontent.com/github-product
   |   | ion-release-asset-2e65be/372924883/2d587d6c-7b0c-41e5-afb0-4d0623fbf0
   |   | cb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQ
   |   | K4ZA%2F20240424%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240424T1
   |   | 81611Z&X-Amz-Expires=300&X-Amz-Signature=5471c683832bbd2331f2dddc33cc
   |   | ff97d91f6b9998c5411ebe03e9e42151e61a&X-Amz-SignedHeaders=host&actor_i
   |   | d=0&key_id=0&repo_id=372924883&response-content-disposition=attachmen
   |   | t%3B%20filename%3DOpenJDK11U-jre_x64_linux_hotspot_11.0.23_9.tar.gz&r
   |   | esponse-content-type=application%2Foctet-st
   |   | /usr/lib/CommandBox/serverJREs/box.json updated with dependency.
   |   | Fixing *nix file permissions on java
   |   | Installing to: /usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux
   |   | _hotspot_jdk-11.0.23+
   |   | -> 359 File(s) Installed
   |   | -> 0 File(s) ignored
   |   | Eureka, 'java:openjdk11:lockVersion' has been installed!
   | √ | Setting site [Testing] Profile to [development]
   |   |---------------------------------------------------------------------------
   |   | Profile set from profile property in server.json
   |   | Block CF Admin disabled
   |   | Block Sensitive Paths enabled
   |   | Block Flash Remoting enabled
   |   | Directory Browsing disabled
   |   | File Caching disabled
   |   |---------------------------------------------------------------------------
   | √ | Installing package [forgebox:lucee@5.4.5]
   |   | Verifying package 'lucee' in forgebox, please wait...
   |   | Installing version [5.4.5+23].
   |   | Verified entry in forgebox: 'lucee'
   |   | Deferring to [https] endpoint for forgebox entry [lucee]...
   |   | Downloading [HTTPS://downloads.ortussolutions.com/lucee/lucee/5.4.5.2
   |   | 3/cf-engine-5.4.5.23.zip
   |   | Decompressing...
   |   | Storing download in artifact cache...
   |   | Done.
   |   | Installing to: /usr/lib/CommandBox/temp/2DCA2B9C-337C-49DE-ADA142D5D3
   |   | EE10A
   |   | -> 2 File(s) Installed
   |   | -> 0 File(s) ignored
   |   | Eureka, 'lucee@5.4.5' has been installed!
   | √ | Loading CFConfig into server
   |   |-------------------------------------------
   |   | Found CFConfig JSON in ".cfconfig.json" file in web root by conventio
   |   | n
   |   | Importing luceeserver config from [/app/.cfconfig.json]
   |   | Config transferred from /app/.cfconfig.json!
   |   | Found box environment variable [CFCONFIG_ADMINPASSWORD]
   |   | Importing into [luceeserver]...
   |   | [ADMINPASSWORD] set.
   |   | No Web context admin password found. Setting your admin password to t
   |   | he same as your Server context password
   |   | [adminPassword] set.
   |   |-------------------------------------------



ERROR (6.0.0+00787)

Cannot run program "/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java": error=2, No such file or directory
  caused by: java.io.IOException
  Cannot run program "/usr/lib/CommandBox/serverJREs/openjdk11_jre_x64_linux_hotspot_jdk-11.0.23+9/bin/java": error=2, No such file or directory
    caused by: java.io.IOException
    error=2, No such file or directory


/system/services/ServerService.cfc: line 1578
1576: 	    processBuilder.redirectErrorStream( true );
1577: 	    // Kick off actual process
1578: 	    variables.process = processBuilder.start();
1579: 
1580: 		// She'll be coming 'round the mountain when she comes...
called from /system/modules_app/server-commands/commands/server/start.cfc: line 173
called from /system/services/CommandService.cfc: line 443
called from /system/services/CommandService.cfc: line 245
called from /system/Shell.cfc: line 862
called from /system/Bootstrap.cfm: line 124

To enable full stack trace, run config set verboseErrors=true

The issue like likely that you’re using an Alpine base image and the version of Java being downloaded from adopt is incorrect. The error Alpine gives when there’s a linking error is file not found, but it’s an inaccurate message. There IS a missing file, but it’s a linked glibc file usually. Using the ldd command will usually reveal this.

Let’s back up to my main big question you didn’t answer though. Why are you even trying to install java at all?? Our docker image already comes with the correct version of Java for Alpine. Is there a good reason you’re not just using that?

I just specified in the server.json that I need openjdk11 as other Versions caused different problems in the past during testing.
I just tried to install java after the file not found error occured.

I just tried the non alpine image which works fine!
My only unresolved question is why this error didn’t occur localy when I used the docker-compose file.
as both machines run on the same architecture the image should have been the same.
However as my setup works now this can remain a mystery to me.