We ran into an issue where the MISP container would fail to build due to wait-for-it.sh not being found in the $PATH variable within the container. The file is present in the web/ folder as expected and I was able to replicate this issue even on a fresh pull of this repo with a fresh Docker installation.
This pull request fixes #154, which includes some additional context.
Justification
Given that wait-for-it.sh is primarily used internally as part of the core image, it should not be included in the docker-compose.yml file.
In the current setup, it may fail to create the docker container for MISP, displaying an error saying that wait-for-it.sh isn't found in the path (due to either permissions issues, or the file not been correctly added to the container via volume):
ERROR: for web Cannot start service web: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "wait-for-it.sh": executable file not found in $PATH: unknown
By moving the inclusion of the script to the Dockerfile it does the following:
Ensures that the script will be included in the path.
Ensures that permissions are set correctly for when the containers are created.
Ensures that the script will be present in the image in the event the web/ folder is removed for any reason.
Reason for Pull Request
We ran into an issue where the MISP container would fail to build due to
wait-for-it.sh
not being found in the$PATH
variable within the container. The file is present in theweb/
folder as expected and I was able to replicate this issue even on a fresh pull of this repo with a fresh Docker installation.This pull request fixes #154, which includes some additional context.
Justification
Given that
wait-for-it.sh
is primarily used internally as part of the core image, it should not be included in thedocker-compose.yml
file.In the current setup, it may fail to create the docker container for MISP, displaying an error saying that
wait-for-it.sh
isn't found in the path (due to either permissions issues, or the file not been correctly added to the container via volume):ERROR: for web Cannot start service web: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "wait-for-it.sh": executable file not found in $PATH: unknown
By moving the inclusion of the script to the
Dockerfile
it does the following:web/
folder is removed for any reason.Tested on an Ubuntu 22.04.1 machine.