Open UsamiChou opened 3 years ago
Hi, I had a problem with that command too. Does the container keeps running or does it exit straightaway?
Hi, I had a problem with that command too. Does the container keeps running or does it exit straightaway?
It exited right away and with the exit code 1
Hello,
Try adding the path like this instead of using the $(pwd) variable:
-w //app -v "//c/Users/UserName/getting-started":/app
making sure you replace the values to point to the correct directory in your local hard disk
Hello, Try adding the path like this instead of using the $(pwd) variable:
-w //app -v "//c/Users/UserName/getting-started":/app
making sure you replace the values to point to the correct directory in your local hard disk
Hey, this doesn't work for me. And I'd prefer not to be mounting things in my Windows directory, I keep everything in WSL 2 and Ubuntu directories.
I figured out my issue, I wasn't in the app
directory. This issue gives more information. https://github.com/docker/getting-started/issues/76#issue-674527916
I also struggled a lot with this section and none of the answers in this thread or the other threads related to the same issue seem to work for me.
I was getting a long error message apparently related to a Core.DockerException. Error status was 500.
I managed to fix this after finding this post: https://www.reddit.com/r/docker/comments/grjwl9/docker_run_rm_v_getting_error_response_from/
Here is the important part:
The -v mounts a location from the local directory to your running container. the left side of the colon in the location on the host computer and the right side is the location in the container that will now be linked together.
The problem was is that when you run Docker in windows you need to specifically give Docker access to this location. To give Docker access to your computer’s drives, right click on the Docker icon in your taskbar, then click “Settings…” and look for the "File Sharing" section. Add the location you want to share and you are good to go!!!
So, apparently it's a common configuration that must be set when using Docker on Windows in Hyper-V mode, as stated in the Official Documentation: https://docs.docker.com/desktop/windows/#file-sharing
I hope it's useful to somebody, it was a big headache for me.
I'm running this tutorial on Windows10 with docker desktop and entering command by Powershell. I followed the instruction to install WSL2 when I open docker desktop first time. After entering
I can see a container running. And by using docker logs -f I can only see a error seems to be a yarn error. And the yarn-error.log:
Since I know little about Linux so after searching the error I still have no idea how this problem occured and how to solve it.
Hoping there could be someone explain this issue for me and provide me with some tips to solve it