Got this error when trying to run a docker container I've already built (using docker-compose
.
Some more info:
Recreating myapp_web_1 ... done
Attaching to myapp_web_1
web_1 | standard_init_linux.go:190: exec user process caused "exec format error"
myapp_web_1 exited with code 1
Offer your help. Be nice!
It turns out I didn't add a shebang (aka #!...
) to my entrypoint.sh
.
The solution was to add #!/usr/bin/env sh
at the beginning of my shell script like this:
#!/usr/bin/env sh
cd /app/
python manage.py migrate
python manage.py runserver 0.0.0.0:8000