Docker/Basics
From charlesreid1
Filesystem basics
Working directory
You can set the working directory using the -w flag:
$ docker run -w /path/to/dir/ -i -t ubuntu pwd
Volumes
You can set storage drive options using storage opt fllag:
$ docker run -it --storage-opt size=120G fedora /bin/bash
You can also mount external (your machine) drives/folders inside the Docker container:
$ docker run \ -v `pwd`:`pwd` \ -w `pwd` \ -i -t ubuntu pwd
The -v flag mounts the current working directory into the container. The -w lets the command being executed inside the current working directory, by changing into the directory to the value returned by pwd. So this combination executes the command using the container, but inside the current working directory.