Skip to content

Instantly share code, notes, and snippets.

@akagaeng
Last active June 16, 2022 05:36
Show Gist options
  • Save akagaeng/99e9bad76ef2ad7276c92fb988c26691 to your computer and use it in GitHub Desktop.
Save akagaeng/99e9bad76ef2ad7276c92fb988c26691 to your computer and use it in GitHub Desktop.
Running linux machine with docker mounting current directory as a volume
#!/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