Tadwork / dockerbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DockerBox

dockerbox is a single executable that runs docker containers based on local and remote run configurations.

Install

By default dockerbox configuration files live in $HOME/.dockerbox/ and binaries are installed at $HOME/.dockerbox/bin/. To override these defaults you can set the following environment variables DOCKERBOX_ROOT_DIR and DOCKERBOX_INSTALL_DIR.

go get github.com/sethpollack/dockerbox

Add dockerbox to your path

export PATH=$PATH:$HOME/.dockerbox/bin/

Add a remote repo to your registry

dockerbox registry add example https://raw.githubusercontent.com/sethpollack/dockerbox/master/example/example.yaml

Add a local repo to your registry

cat <<'EOF' >$HOME/.dockerbox/local.yaml
applets:
  kubectl:
    name: kubectl
    image: sethpollack/kubectl
    image_tag: 1.8.4
    entrypoint: kubectl
    environment:
    - KUBECONFIG=/root/.kube/config
    volumes:
    - $HOME/.kube:/root/.kube
    - $PWD:/app
    work_dir: /app
EOF

dockerbox registry add local $HOME/.dockerbox/local.yaml

To see the list of available applets run dockerbox list

To update your applet cache ($HOME/.dockerbox/.cache.yaml) from all the repos in the registry run dockerbox update.

To install an applet run dockerbox install -i <applet name> or dockerbox install -a to install all available applets.

dockerbox installs applets by creating a symlink from $HOME/.dockerbox/<applet name> to the dockerbox binary.

Full applet spec:

  • name string
  • work_dir string
  • entrypoint string
  • restart string
  • network string
  • rm bool (defaults true)
  • tty bool (defaults true)
  • interactive bool (defaults true)
  • privileged bool
  • detach bool
  • kill bool (kills running container with the same name before running)
  • environment list
  • volumes list
  • ports list
  • env_file list
  • dependencies list (list of applets to run first)
  • links list
  • image string
  • image_tag string
  • command list

Usage

Usage:
  dockerbox [command]

Available Commands:
  help        Help about any command
  install     install docker applet
  list        list all available applets in the repo
  registry
  uninstall   uninstall docker applet
  update      update the repo from the registry configs
  version
Usage:
  dockerbox registry [command]

Available Commands:
  add         Add or update a repo in the registry.
  remove      Remove a repo from the registry

About

License:MIT License


Languages

Language:Go 95.5%Language:Makefile 4.5%