Hi terpz, thanks for the reply. I’m using mac OS to run docker, so it should be $pwd. I changed it to (pwd) and {pwd} and it did not run unfortunately.
I generally prefer to designate the present working directory via pwd, like so, which is a bit more portable across distributions:
docker run -v `pwd`:/home/ -ti centos:latest
If you prefer to use the named environment variables, then on my Mac, using the stock shell, $PWD works, while $pwd is undefined, like so
Thanks for the suggestion! I think you have to use $pwd to access it, as using the other options gave me the following error (Apparently you can’t use uppercase, but lowercase will be recognized):
chrismacbook:bdata chris$ docker run -v $PWD:/home/ -ti centos:latest
docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
chrismacbook:bdata chris$ docker run -v `pwd`:/home/ -ti centos:latest
docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
I was thinking it may have to do with the drive being in ExFat format… But I wouldn’t know what other format to use for big files.
I played around with your example a bit and I realized why it wasn’t working – my external harddrive was named with a space (by default) so the pwd and $PWD representations didn’t work. Changing the harddrive name to a single word allowed me to run your commands and it’s working as it should now! I appreciate all the help! Thanks a lot!