Skip to content

igor-kozhevnikov/cross-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross for Docker

PHP License Release

Set of console commands for docker.

Install

This package depends on Cross package.

composer require igor-kozhevnikov/cross-docker

Configuration

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.

Commands

Build containers

./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

Down containers

./vendor/bin/cross docker:down

Config:

  • options Applied options

Restart containers

./vendor/bin/cross docker:restart [options]

Options:

  • -d --down Downing containers instead of stopping

Go into a container

./vendor/bin/cross docker:ssh
./vendor/bin/cross ssh

Config:

  • container Container to enter
  • options Applied options
  • command Command to execute
  • arguments Applied arguments for the command

Start containers

./vendor/bin/cross docker:start
./vendor/bin/cross start

Stop containers

./vendor/bin/cross docker:stop
./vendor/bin/cross stop

Config:

  • options Applied options

Up containers

./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

License

The Cross for Docker is open-sourced software licensed under the MIT license.

About

Set of commands for docker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages