PhpZone Docker¶
A Docker command builder configured by YAML, based on PhpZone. Its primary purpose is to provide a simple way to define commands for running Docker containers/instances which could be used in daily workflow of every developer. With this plugin, you no longer need to have advanced knowledge about Docker, as you can add store simple commands to your configuration. This is also useful for advanced users who want to store ready-made commands.
Attention
This tool is only a configurator and executor of Docker commands, applications Docker and `Docker Compose`_ are not included.
Basic Usage¶
An example speaks a hundred words so let’s go through one.
The configuration file below is used for the development of this extension:
Create a phpzone.yml
file in the root of a project:
extensions:
PhpZone\Docker\DockerCompose: # register an extension with a configuration
db:
description: Run DB which can be used for running tests
name: myproject
file: docker-compose.yml
command: up
and run:
$ vendor/bin/phpzone db
This will compose a proper Docker Compose command docker-compose -f docker-compose.yml -p myproject up
and
execute it.