service “apex-download” didn’t completed successfully: exit 2 

While following Anders Swanson nice post to download and configure ORDS Docker to my Windows 11 laptop:

I got the following error:
service “apex-download” didn’t completed successfully: exit 2 

First of all, let us Check the Container Logs:


That mangled error message is a classic giveaway: your repository has the wrong line endings.

When you cloned the repository to your laptop, Git automatically converted the line endings in the scripts from Linux format (LF) to Windows format (CRLF).

When the Linux-based apex-download container tries to run the setup script, it reads set -o pipefail\r. Because of that hidden \r (carriage return), it looks for an option literally named pipefail\r. Since that doesn’t exist, it crashes. The text looks weird in your terminal because the \r sends your cursor to the beginning of the line, overwriting the first half of the error message.

Here is how to fix the line endings and get your containers running:

1.Tear down the failed environment:

First, clear out the broken containers and the partially created volumes from your failed run.

docker-compose down -v


Tell Git to stop automatically converting line endings to Windows format for this repository.

git config core.autocrlf false

2.Refresh the repository files:

Clear your Git cache and perform a hard reset. This forces Git to restore all the files in your directory with their original Linux (LF) line endings.

git rm --cached -r .
git reset --hard

Now that the scripts have the correct line endings, spin up your environment. The download script will execute successfully.

APEX_ENABLED=true docker-compose up -d

This is actually exactly what you want to see — your setup was successful.

Notice that there is no error message at the end this time. The apex-download container is designed as an “init container.” Its only job is to download the Oracle APEX installation files from the internet, extract them into the shared volume, and then shut down.

The fact that it ran for ~130 seconds and then smoothly transitioned to Exited means it successfully downloaded and staged the files. Because it finished its job without crashing, Docker Compose proceeded to start your main, long-running services: ordsdb and ords.

What to do next

Even though the ordsdb container is “Started”, an Oracle database takes several minutes to fully initialize, format its datafiles, and install the APEX schemas on the very first run.

You can watch its progress in real-time by following the database logs:

docker logs -f ordsdb

(Press Ctrl+C to exit the log view at any time).

Wait until you see a message in those logs indicating the setup is complete and the database is ready for connections (usually something like DATABASE IS READY TO USE). Once it is fully initialized, the ords container will connect to it, and your APEX environment will be live.

To login to the Apex:

Leave a Reply