Skip to content
Helper commands for docker because typing long docker commands is boring...
Branch: master
Clone or download
timlinux Merge pull request #2 from rduivenvoorde/master
Add missing command, dhelp and format better for cli
Latest commit 47a7218 May 11, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore First add of docker helper commands May 8, 2014
README.md Add missing commands to readme May 11, 2018
backup_docker_databases.sh Added command to backup all databases in docker containers Sep 2, 2015
dcall Use docker rather than docker.io Aug 4, 2014
dcalldated Added some missing commands Sep 1, 2014
deall Tidy ups for exporters Sep 1, 2014
dealldated Small formatting fixes and actually use context for dealldated Sep 6, 2014
dhelp Add dhelp command, because I'm a sucker in remembering commands May 11, 2018
dimpall Fix dipall script Jan 11, 2017
dipall Fix dipall script Jan 11, 2017
dli Use docker rather than docker.io Aug 4, 2014
dnames Fix for changes introduced with docker 1.6 or 1.7 that prevent dipall… Jul 1, 2015
dpasswords Use docker rather than docker.io Aug 4, 2014
dps Tidy ups for exporters Sep 1, 2014
dpsa Added some missing commands Sep 1, 2014
drmc Use docker rather than docker.io Aug 4, 2014
drmi
dstart Added dstart command Aug 25, 2014

README.md

docker-helpers

Tim Sutton, 2014

Helper commands for docker because typing long docker commands is boring...

Setup

cd ~
mkdir bin
cd bin
git clone git@github.com:timlinux/docker-helpers.git

Now add this somewhere to your ~/.bashrc:

export PATH=$PATH:$HOME/bin/docker-helpers

Warning: Some of these commands may be destructive - use at your own risk and test on a test system before using in a production environment.

Command quick reference

  • backup_docker_databases.sh - backup all 'postgis' image based databases
  • dcall - Commit all named containers. Provide a prefix for the image name. The committed image will be in the form <namespace>/<container name>.
  • dcalldated - Like the above command but adds a date stamp as the tag. The committed image will be in the form <namespace>/<container name>:01-Septmber-2014.
  • deall - Export all named containers. Exported containers will be named in the form docker-export-<container name>.tar.
  • dealldated - Export all named containers. Exported containers will be named in the form docker-export:<namespace>:<container name>:<date>.tar.
  • dimpall - Importing all exported containers from ~/exported-docker-containers into name:latest.
  • dipall - List the name and IP address of all named containers. Output will be in the form <container name> : IP Address.
  • dli - List all images. Shorthand for docker images.
  • dnames - List all the names of named containers.
  • dpasswords - Print the names and passwords from all named containers. When you set up your container, print any passwords to stdout so they show up in the docker logs command. Be sure to print the word password in your stdout message as this is a simple grep operation.
  • dps - List all running containers. Short hand for docker ps.
  • dpsa - List all running containers. Short hand for docker ps -a.
  • drmc - Remove all stopped containers.
  • drmi - Remove all images that have no tags.
  • dstart - Start all exited containers. Typically you want to do this after a host reboot.

Note: Docker namespaces must be at least 3 characters long and less that 30

You can’t perform that action at this time.