Docker Filesystems and Docker containers work in a similar manner to filesystems outside a Docker container. To provide users read/write/execute permissions use this command chmod 0777 /usr/local/docker/foo
To create a Directory that does not exist you have to use the --p command along with the mkdir command. Becausemkdir isn't recursive by default -- it expects the immediate parent directory to exist.
Docker mkdir permission Failed ? For using data volumes in Docker by command-line and If your Docker host is on the Linux platform, you can find Docker volumes by /var/lib/docker/volumes path.
To create a folder in docker or a file create a directory for the build context and cd into it. You can use the classic mkdir command to create a folder in Docker.