I can't run my docker image in my container in Docker-Desktop on Windows: docker image - container
Here is my file entrypoint.sh :
#!/bin/sh
echo $0
set -e
# Global variables
PYTHONPATH="${PYTHONPATH}:/app/src"
PYTHON_BIN=$(which python3)
APP_ENTRYPOINT="/app/src/loadguard/main.py"
# Entrypoint parameter
[ -z "${APP_MODULE}" ] && echo "Environment variable is missing: $(APP_MODULE)" && exit 128
# Exports environment variables
export PYTHONPATH
command=${1}
echo "${command}"
case ${command} in
test)
echo '{"command": "test"}'
;;
console)
echo '{"command": "console"}' && bash
;;
wait)
echo '{"command": "wait"}' && sleep infinite
;;
run)
echo '{"command": "run"}' \
&& exec poetry run ${APP_ENTRYPOINT} run --module "${APP_MODULE}"
;;
*)
echo '{"command": "$@"}' \
&& exec "$@"
;;
esac
When I put LF on the file entrypoint.sh on Vscode here is the error in the docker logs: "No such file or directory't execute 'python3"
and when I put CRLF here is the error : "exec /opt/entrypoint.sh: no such file or directory"
In the 2 cases my API-1 container does not launch. I tried to reinstall python, to modify my environment variables, switch to a linux terminal thanks to WSL but nothing works.
I don't know what to do anymore, I've tried several things but nothing works, I need help please.