A command to make life easier when using Docker on the CLI, it is designed as a development tool and therefore makes some assumptions about your development environment.
Only tested on my Mac laptop so:
Pull requests and Issues welcome!
sudo curl -L https://raw.githubusercontent.com/sillelien/dkr/master/dkr > /usr/local/bin/dkr && sudo chmod 755 /usr/local/bin/dkr
dkr help
To get the latest version of the script
dkr update
dkr do
dkr build-run
dkr bld
dkr rn
dkr drun
dkr open 8080
dkr open 8080 subdir/file.html
To remove all images and containers to free up space:
dkr clean
To remove all images and containers even if they are in use to free up space:
dkr fcn
dkr force-clean
dkr bsh
dkr bash
dkr bash -v /var/run/docker.sock:/var/run/docker.sock debian:jessie
dkr fix-mac
To run a bash shell in Ubuntu (maybe to check how a command works or something).
dkr bash
dkr upd
dkr update-dkr
Please fork and switch to the dev branch and create PRs from their.
To test the dev branch:
sudo curl -L https://raw.githubusercontent.com/sillelien/dkr/dev/dkr > /usr/local/bin/_dkr && sudo chmod 755 /usr/local/bin/_dkr
Then use the _dkr command instead of dkr for testing, you can also use _dkr update
safely as it will only update the dev version.