Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStefan Brandenberger
4,745 PointsMongoDB doesn't start
First: please provide the two Files (Dockerfile and docker-entrypoint.sh) as Downloads. Copy/Paste from the screen is sometimes a bit unreliable (Linefeeds and so...). Then a second remark: In the Dockerfile, only Port 27017 is exposed whereas in your video you expose also 28017, when you run the container (docker run -p ... 28017:28017 ...).
But my real issue is: MongoDB doesn't start up. If I check the logs, I see there: standard_init_linux.go:187: exec user process caused "no such file or directory".
What am I doing wrong?
Working on Windows 10, if that's of interest.
3 Answers
Paul Flanders
520 Pointsdocker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"docker-entrypoint.sh\": executable file not found in $PATH": unknown.
Agreed
chmod +x docker-entrypoint.sh prior to running build
Ari Misha
19,323 PointsHiya there! Thats exactly why i dont use Docker. It messes up with your system a lot especially if its a windows pc. Now regarding your issue. It looks like it couldn't find the PATH VARIABLE for Mongo. I can think of two solutions:
-
Set your Path Variable to Mongo's .exe file in your Home directory in Advanced Environment Variable Settings.
OR
Uninstall your MongoDB and reinstall it again.
~ Ari
Stefan Brandenberger
4,745 Points@Robert You're right! I must have overlooked that.
@Ari Thanks for the hints. Well, MongoDB is part of the Dockerfile, so I cannot uninstall/install it solely. But anyway, I just pulled the image from dockern00b/mongodb. And that runs. Seems, something is wrong with the Dockerfile or the docker-entrypoint.sh script I copied and pasted.
Robert Durbin
1,355 Points@stefan, I initially copy and pasted and ran into formatting issues as you did. For the docker-entrypoint.sh, I had to chmod +x in order to get it to run.
Robert Durbin
1,355 PointsRobert Durbin
1,355 PointsI just saw the download link in the teachers notes.