This CLI application provides an abstraction layer for Docker-based projects.
Note: right now, it's focused on OSX and Debian-based Linux distributions.
Download the last PHAR release:
wget http://sroze.github.io/dock-cli/downloads/dock-cli-latest.phar -O dock-cli
chmod +x ./dock-cli
sudo mv dock-cli /usr/bin/dock-cli
To install the Docker development environment run:
dock-cli docker:install
Note: This sets environment variables which are loaded for the current shell and any opened after running it.
If you have any other shells already opened you will need to source
these variables before running the other commands.
If you see an error message similar to Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
when running subsequent commands then this may be the issue.
You can now start up a specific project by running the up
command in the project directory:
dock-cli up
The following commands are available:
docker:install
command sets up your Docker development environment.docker:restart
command restarts your Docker VM.
start
command starts the Docker environment for the project.stop
command stops the running Docker containers of the project.ps
command list all the project containers if any.logs
command follows the logs of all or a given container.
To update this tool, simply run the self-update
command:
dock-cli self-update
Note If you are cloning this repository then one of the packages included in the vendors requires the ssh2 PHP extension. If you do not have this installed and do not require the associated functionality then you can ignore this requirement when installing the vendors:
composer install --ignore-platform-reqs