Set of console commands for docker.
This package depends on Cross package.
composer require igor-kozhevnikov/cross-docker
If your project doesn't have a cross.php
config file in the root directory, just run the follow command.
./vendor/bin/cross cross:config
Add data as described below to the cross.php
file.
<?php
return [
'plugins' => [
\Cross\Docker\Plugin\Plugin::class => [
'env_paths' => 'docker/.env',
],
],
'commands' => [
\Cross\Docker\Commands\SSH::class => [
'container' => 'packager_workspace',
],
],
];
To learn more about the available configurations, see the plugin and commands config files.
./vendor/bin/cross docker:build [options] [--] [<container>]
Arguments:
container
Container for building
Options:
--no-cache
Don't use cache during build
Config:
options
Applied options
./vendor/bin/cross docker:down
Config:
options
Applied options
./vendor/bin/cross docker:restart [options]
Options:
-d
--down
Downing containers instead of stopping
./vendor/bin/cross docker:ssh
./vendor/bin/cross ssh
Config:
container
Container to enteroptions
Applied optionscommand
Command to executearguments
Applied arguments for the command
./vendor/bin/cross docker:start
./vendor/bin/cross start
./vendor/bin/cross docker:stop
./vendor/bin/cross stop
Config:
options
Applied options
./vendor/bin/cross docker:up [options] [--] [<container>]
Arguments:
container
Container to up
Options:
--build
Build and run containers--remove-orphans
Run containers with removing orphans--no-detach
Run containers in front
Config:
options
Applied options
The Cross for Docker is open-sourced software licensed under the MIT license.