Skip to content
Easy docker-compose local development setup for your LAMP and LEMP projects.
Branch: master
Clone or download
Latest commit 125389b May 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin implement more di and update readme Apr 13, 2019
config some more refactoring (bugged commit) May 13, 2019
src better code formatting, psr2 compliant May 17, 2019
stubs/.docker fix the stubs to work better with xdebug May 11, 2019
tests/PHPUnit fix tests paths May 13, 2019
.gitignore
CHANGELOG.md Setting up testing Feb 7, 2019
LICENSE Setting up testing Feb 7, 2019
README.md update readme May 17, 2019
box.json fix issues when loading file without project-path option May 13, 2019
composer.json update readme May 17, 2019
composer.lock fix issues when loading file without project-path option May 13, 2019
phpunit.xml fix tests path May 13, 2019

README.md

Dockr CLI

Build Status Latest Stable Version Total Downloads License

Easy docker-compose local development setup for your LAMP and LEMP projects.

Requirements

  • Docker & docker-compose
  • PHP 7.1+
  • ext-json
  • ext-ctype

Download

For direct use

To download the latest release, head over to Releases and pick the latest PHAR. Then:

$ dockr.phar --version

Feel free to move this to /usr/local/bin so you can run it from anywhere: $ mv ./dockr.phar /usr/local/bin/dockr

Per project installation
$ composer require dugajean/dockr-cli --dev
$ vendor/bin/dockr --version

Usage

Run the following command to initialize dockr:

$ dockr init

Open the newly created file dockr.json and read through it. Make sure everything is what you expect it to be. Then refer to the aliases section of the file. There you will see a couple of aliases preset for you: One will turn on the Docker containers and the other will shut them off.

Use as follows: $ dockr up and $ dockr down respectively.

You can also set your own aliases there to control your setup. You can set aliases for SSH-ing into a container, delete the docker images or whatever you want. You can also point to a class which extends Symfony's Command class by providing the fully qualified namespace.

Examples:

// ...

"aliases": {
    // ...
    "ssh": {
        "help": "SSH into a container.",
        "commands": [
            "docker-compose -f .docker/docker-compose.yml exec {container} bash"
        ]
    },
    "mycmd": [
        "\\Fully\\Qualified\\Namespace\\To\\MyCommand"
    ]
}

Execute the commands like so: $ dockr ssh php-fpm and $ dockr mycmd. As you can see, you can provide arguments to your custom commands.

For a full list of available commands, run $ dockr and if you need help with a specific command run:

$ dockr help <command>

Testing

$ vendor/bin/phpunit

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

Pouch is released under the MIT License.

You can’t perform that action at this time.