Created
August 22, 2018 13:53
-
-
Save tw3/d8acc7378fa01d59a64caeff9606d24a to your computer and use it in GitHub Desktop.
Run a bash shell inside a node docker container with a shared volume
This file contains 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
#!/usr/bin/env bash | |
docker run -it --name container1 -v /home/tweatherly/dir:/home/node/app node:8 bash | |
# /home/tweatherly/dir is the local machine directory to share | |
# /home/node/app is the the mapped directory within the node container | |
# | |
# you can specify a custom shell instead of node:8, e.g. | |
# pmoreau/node8-npm5-ngcli:8.9.3-5.5.1-6.0.3 | |
# Run this command afterwards to remove the container | |
# docker rm container1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment