davidcallanan / os-series

818 stars 119 forks source link

Altered docker run command in README #23

Closed raj-krishnan-r closed 3 years ago

raj-krishnan-r commented 3 years ago

Alteration was done since it was found that Linux environment have $PWD set but not $pwd. Since $pwd returns an empty string, this wont cause an error, but the landing location is not same as that as where the source files are.

LainShot commented 3 years ago

Hey @spiralcode I can confirm this, you can also use this.

"$(pwd)":/root/env/ 

Seems to be case agnostic. I would suggest using this in you're code as it can't hurt, and will mean that case of the env does not matter and the mount will always be correct. 😎

davidcallanan commented 3 years ago

Thanks, this issue is already being tracked here: #38

I'm guessing $PWD uses the environment variable, whereas $(pwd) runs the command pwd? Is that why both solutions work?