Last active
June 16, 2022 05:36
-
-
Save akagaeng/99e9bad76ef2ad7276c92fb988c26691 to your computer and use it in GitHub Desktop.
Running linux machine with docker mounting current directory as a 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
#!/bin/bash | |
# Mount PWD onto the docker container path /app | |
docker run \ | |
-v ${PWD}:/app | |
node:16-alpine \ # image name i.g. ubuntu, ... | |
-it /bin/sh | |
# usage | |
docker run -it -v $PWD:/app node:16-slim /bin/sh | |
docker run -it -v $PWD:/app ubuntu:18.04 /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment