“docker-compose up” fails with error
I want to work on a project, but I need to use docker for running the app, but the
docker-compose up command fails with this error:
System error: exec: "./wait_to_start": stat ./wait_to_start: no such file or directory
The wait_to_start command is an executable python script in the subfolder backend/.
I need to determine why it cannot be executed. Either it’s been searched in the wrong path, or there are access right problems, or maybe the wrong python version is used.
Can I debug it with details, or login with SSH and check the files on the virtual machine? I’m too unexperienced with Docker…
2 Solutions collect form web for ““docker-compose up” fails with error”
You can either set the “workdir” metadata to make sure you are in the right place when you start a container or simply call
/backend/wait_to_start instead of
./wait_to_start so you remove the need to be in the proper directory.
Do debug with
docker-compose I would do this:
docker-compose run --entrypoint bash <servicename>
That should give you a prompt and let you inspect the file and working directory, so see what’s wrong.