MISP / x_old_misp_docker

MISP Docker (XME edition)
284 stars 172 forks source link

Fix wait-for-it.sh #159

Closed shrikeinfosec closed 1 year ago

shrikeinfosec commented 1 year ago

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 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:

Tested on an Ubuntu 22.04.1 machine.

righel commented 1 year ago

Thanks.