Created
March 23, 2018 23:45
-
-
Save nfisher/05cece7356a1b52ed20e65c7fce3eef0 to your computer and use it in GitHub Desktop.
docker bind local folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose run dev bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
dev: | |
build: . # assumes you have a local docker file otherwise specify an image | |
ports: | |
- "5000:5000" | |
volumes: | |
- ~/.ssh:/root/.ssh # might need to tweak this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it --name $NAME --mount src="$SSH_PATH",target=/root/.ssh,type=bind $IMAGE bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment