Windows 10 - web container does not launch [SOLVED]
So this is a Windows-specific issue from what I can tell, and I'm posting this here in case someone else needs the solution. Please feel free to edit/close the issue immediately.
Description:
I finished Part 1 on a Windows desktop without issues, pushed my code to GitHub and wanted to resume on another Windows laptop later. When I'd try to bring the containers up, I noticed that only web-db would stay up, while web crashed immediately.
docker ps -a indicated that web had crashed on the entrypoint command in the Dockerfile (running the entrypoint.sh shell script)
I checked for clues using docker logs <container id for web> and saw the error message:
standard_init_linux.go:228: exec user process caused: no such file or directory
Solution:
After a little searching, I found a reference that suggested changing the EOL markers from CRLF to LF on entrypoint.sh in an editor.
I'm not sure when it was set to CRLF, or if it changed when pushing to GitHub - since it did not pose an issue on my Windows Desktop.
Bringing the containers down and back up again did the trick:
docker-compose down -v
docker-compose up -d --build
Reference: https://stackoverflow.com/questions/51508150/standard-init-linux-go190-exec-user-process-caused-no-such-file-or-directory