Closed slacker298 closed 6 years ago
Hey slacker, glad to see those changes worked out for you! It's strange that you're unable to read the files though. I'll have to poke around a bit to see what's going on.
In the meantime, this should help clear the air around the docker command: the v
flag plus `pwd`:/data
mounts whatever pwd
resolves to on the host system to the /data
drive on the container. Omitting the first part just creates that volume in the container.
So how that applies for you: you'll have to pardon me a second, as I haven't used Windows in a while( and when I did, I was running MinGW so I could run Unix commands). Instead of `pwd`
, I'd try running %cd%
instead (so docker run --rm -itv %cd%:/data datascienceworkshops/data-science-at-the-command-line
. Otherwise I believe pwd
will work in PowerShell.
Unfortunately I don't have any resources handy for learning docker beyond their docs. But if you have any other questions around docker I'd be happy to answer them!
in Windows, if you use double-quote instead of one quote the command will work eventually:
docker run --rm -itv "pwd":/data datascienceworkshops/data-science-at-the-command-line
I ran into the same issue you had and didn't find a solution so far, I think it is related to the structure of the data files inside Docker container.
Fixed by datascienceworkshops/dockerfiles@d200080374145ac9cfab8e3159747d3fa9504cbf.
First of all, I would like to thank Crevax for solving the previous issue I had - I was able to pull the data and access the files in the book! But now, I am running into another issue. This may not be a problem with the data or files, but I believe it is a problem for those who are new to the command line because I am not able to resolve this issue myself.
Following the examples in Chapter 2 to get to the directory for chapter to and examine the 'movies.txt' file, I can see that the file is there, but when i try to run the command:
head -n 3 data/movies.txt
I get the error "head: cannot open 'data/movies.txt' for reading: No such file or directory" even though I can see the file with the ls command! I have included a screenshot of my command line prompt for someone better versed in docker to see if I have made a mistake. I think it is worth noting that I cannot exactly follow the docker run command from the book as the ` symbol throws errors in the windows cmd, so maybe my arbitrary directory naming of "dsacm" is the problem. Also there is the fact that I have to take a roundabout path to get to the actual directory containing the data - not sure if this has something to do with it either.If this is an issue with my docker experience I would greatly appreciate some sources of how to learn docker (preferably other than the official docker website, it's descriptions are a bit abstract for someone with 0 formal CS education). But really if anyone could shed some light on the issue I am having I would be very grateful. Thanks!
Additional info: I am running Windows 10 x64 with Docker version 17.12.0-ce, build c97c6d6