/mac-docker-go

Makes your life easier with Docker on MacOS - start/stop/remove/kill/prune...

Primary LanguageShellMIT LicenseMIT

mac-docker-go

Script to make your life easier with Docker daemon on MacOS.

It supports:

  • starting/restarting/status of Docker daemon
  • killing/removing Docker containers, images
  • pruning images, volumes, networks...

Install

$ brew install nejckorasa/tap/dckr

See homebrew-tap

Usage

Usage: dckr [options]

Start/stop docker daemon and kill/remove/stop/prune containers, images, volumes...

Options:
  k     | --kill                 Kill daemon
  s     | --start                Start daemon
  r     | --restart              Restart daemon
  st    | --status               Status of daemon

  ka    | --kill-all             Kill all running containers
  sa    | --stop-all             Stop all containers
  rma   | --remove-all           Remove all containers
  rmai  | --remove-all-images    Remove all images

  ip    | --image-prune          Remove dangling images
  ipa   | --image-prune-all      Remove all unused images
  vp    | --volume-prune         Remove all unused volumes
  np    | --network-prune        Remove all unused network
  sp    | --system-prune         Remove all unused objects

  -h                             Display help

Some Examples

Restart docker daemon:

$ dckr r

Kill docker daemon:

$ dckr k

Stop all containers:

$ dckr sa

Removing all containers:

$ dckr rma

Removing all images:

$ dckr rmai

See Usage for all options