https://github.com/jpbochi/drun
docker run on pwd
https://github.com/jpbochi/drun
cli devops devops-tools docker homebrew nodejs shell
Last synced: 10 months ago
JSON representation
docker run on pwd
- Host: GitHub
- URL: https://github.com/jpbochi/drun
- Owner: jpbochi
- License: other
- Created: 2016-06-01T11:46:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-06T21:29:43.000Z (over 6 years ago)
- Last Synced: 2025-03-23T19:39:44.690Z (11 months ago)
- Topics: cli, devops, devops-tools, docker, homebrew, nodejs, shell
- Language: Shell
- Size: 70.3 KB
- Stars: 7
- Watchers: 1
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://app.shippable.com/github/jpbochi/drun/runs?branchName=master)
# drun
This tool is a simple wrapper around `docker run` which will mount the current directory. It's useful when you have that python/node/ruby/whatever script that depends on locally installed stuff. Forget pyenv and rbenv. Just get inside a docker container with `drun`.
## Install
If you use [brew](http://brew.sh/), do: `brew tap jpbochi/tap && brew install drun`
If not, try: `curl -fsSL https://raw.github.com/jpbochi/drun/master/install.sh | bash`
If you want to install an specific version, try: `curl -fsSL https://raw.github.com/jpbochi/drun/master/install.sh | bash -s -- -v 1.2.1`
You can also install it somewhere else with: `curl -fsSL https://raw.github.com/jpbochi/drun/master/install.sh | bash -s -- -d ./temp`
## Suggested aliases
```
alias dr-node='drun -N -P'
alias dr-compose='drun -e HOME="$HOME" -I docker/compose:1.9.0'
alias dr-py='drun -I python:2.7'
```
## Examples
```
$ drun alpine sh
/Users/jpbochi/src/jp/drun # ls
README.md drun install
/Users/jpbochi/src/jp/drun # echo hello > world.txt
/Users/jpbochi/src/jp/drun #
$ ls
README.md drun install world.txt
$ drun alpine false
$ echo $?
1
$ node --version
v5.12.0
$ drun node:5.7 node --version
v5.7.1
$ ARRRRR=arrrrrrrrrrr MOARRR=moar drun -e ARR alpine env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=moby
TERM=xterm
ARRRRR=arrrrrrrrrrr
MOARRR=moar
HOME=/Users/jpbochi/src/jp/drun
no_proxy=*.local, 169.254/16
```