You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try out this demo with docker and run docker compose run app /venv/bin/python manage.py migrate exec /code/docker-entrypoint.sh: no such file or directory shows up in terminal.
I checked inside the docker image docker run -it --entrypoint /bin/bash bakerydemo-app, the docker-entrypoint.sh is inside. I also added the line RUN chmod +x /code/docker-entrypoint.sh in Dockerfile but it did nothing. Redis and Postgres seemed to work in real-time logs.
The text was updated successfully, but these errors were encountered:
I solved it myself.
It seems that in Dockerfile ENTRYPOINT ["/code/docker-entrypoint.sh"] line does not work. It can instead be CMD ["/bin/sh", "-c", "/code/docker-entrypoint.sh"].
I found the unix line endings on entrypoint.sh are secretly converted to windows CRLF style when git clone'ing the repo, causing a 'not found' error when launched out of a docker container. Also may need chmod'ing in the Dockerfile? I think this flavor of Debian may return a not found when it really means can't execute
I had the same problem and I found a quick fix in my particular case.
It seems the files arborescence was the issue, I just had to add .. in front of the migrations commands for it to work : docker compose run app ../venv/bin/python manage.py migrate docker compose run app ../venv/bin/python manage.py load_initial_data
When I try out this demo with docker and run
docker compose run app /venv/bin/python manage.py migrate
exec /code/docker-entrypoint.sh: no such file or directory
shows up in terminal.I checked inside the docker image
docker run -it --entrypoint /bin/bash bakerydemo-app
, the docker-entrypoint.sh is inside. I also added the lineRUN chmod +x /code/docker-entrypoint.sh
in Dockerfile but it did nothing. Redis and Postgres seemed to work in real-time logs.The text was updated successfully, but these errors were encountered: