How to : Docker mount current working directory as volume

Hello Everyone,

If you have a docker container and you would like to mount one of your current folder in the host machine as volume inside your container, then you can use below command


docker run --rm -it -v $(pwd):/usr/src/project gcc:4.9
 

use cases:

- If you local folder have your source code and you like to execute inside your container environment manually. 

Comments

Popular posts from this blog

grep: unknown device method

Uploading files to FTP/SFTP using CURL

How to find outgoing IP in Linux ?