Giter Club home page Giter Club logo

docker-helpers's Introduction

docker-helpers

Tim Sutton, 2014

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

Setup

cd ~
mkdir bin
cd bin
git clone [email protected]: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

docker-helpers's People

Contributors

timlinux avatar rduivenvoorde avatar

Stargazers

Faneva Andriamiadantsoa avatar BoilingSoup avatar JigSaw avatar  avatar Szymon Ciołkowski avatar Nikita avatar Danny Pesses avatar Chris Frohoff avatar Zer0g avatar Ismail Sunni avatar Sokratis Galiatsis avatar Ruslan Zavacky avatar  avatar Thomas Gratier avatar langdon avatar

Watchers

Hervé Leclerc avatar Gavin Fleming avatar Ricardo Garcia Silva avatar Rizky Maulana Nugraha avatar James Cloos avatar Ismail Sunni avatar Jachym Cepicky avatar langdon avatar Dimas Ciputra avatar Muhammad Anis avatar  avatar mazano avatar Samweli Mwakisambwe avatar Irwan Fathurrahman avatar Boney Bun avatar Nurwanto avatar alpha-geek avatar  avatar Alison Mukoma avatar  avatar  avatar M Yarjuna Rohmat avatar Faneva Andriamiadantsoa avatar André Kruger avatar  avatar Lindsay Walker avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.