定制 igor-kozhevnikov/cross-docker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

igor-kozhevnikov/cross-docker

最新稳定版本:v1.5.1

Composer 安装命令:

composer require igor-kozhevnikov/cross-docker

包简介

Set of console commands for docker

README 文档

README

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.

统计信息

  • 总下载量: 67
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-05