Dock is a shell script which helps you to bootstrap databases and other tools in seconds. You don't install the tools natively on your computer! Instead, Dock runs a Docker container on your machine and exposes required ports and IP addresses to your host machine.
Your benefit: concentrate on development flow and omit system setup overhead. In case you don't need the setup anymore, just destroy the Docker container and you're done.
Installation
Dock has one requirement: Docker. Head over to the Docker installation guides and install for your platform. For us: boot2docker
worked well on OS X.
Install on OS X using Homebrew
Ben (the author of Dock) created a Homebrew tap to make Dock available via package manager. Add the tap to your local Homebrew and install Dock right away.
brew tap bripkens/dock
brew install dock
Any upgrades are now available via Homebrew.
brew update
brew upgrade dock
Install on other Platforms
Download or clone the repository and add the download path to your system's $PATH
. Else, just download Dock somewhere on your $PATH
like ~/bin
. Next, add execution rights to Dock and initialize.
chmod +x /path/to/dock
dock -u
Ben provides a one-liner installing Dock to your ~/bin
folder
curl https://raw.githubusercontent.com/bripkens/dock/master/dock -so ~/bin/dock && \
chmod +x ~/bin/dock && \
dock -u && \
echo "dock installation successful.
Try running 'dock'"
Usage
Get a list of Dock commands running dock
without arguments.
Bootstrap a database or tool with Dock by adding its name as an argument.
$ dock redis rethinkdb rabbitmq
Starting redis (using /Users/marcuspoehls/.dock-formulas/formulas/redis)
Container started
Name: redis
IP: 192.168.59.103
Ports: 6379
Starting rethinkdb (using /Users/marcuspoehls/.dock-formulas/formulas/rethinkdb)
Container started
Name: rethinkdb
IP: 192.168.59.103
Ports: 8080 28015 29015
Starting rabbitmq (using /Users/marcuspoehls/.dock-formulas/formulas/rabbitmq)
Container started
Name: rabbitmq
IP: 192.168.59.103
Ports: 5672 15672
Admin user: admin
Admin pw: A3y6crBkMk8k
The console output prints the IP addresses and ports used by the database or tool and (if needed) the default login credentials.
Supported Databases and Tools
Dock currently integrates 26 databases and platforms. Get the complete list running dock -l
. Additionally, check out the formulas directory.
New tools are integrated on the fly. Feel free to contribute your own formula by sending a pull request.
Private Formulas
In case you want to use a custom Docker image not available on Docker Hub, create a formula in the .dock-formulas
directory relative to your current working directory. Dock will search this folder for custom formulas.
Contribute Formulas
You want another database or tool integrated to Dock? Go ahead, and follow Dock's contribution guide. Basically, fork the repo, add your formular and open a pull request. Ben will review, comment, merge, be happy :)