mf/docker-ip 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mf/docker-ip

Composer 安装命令:

composer require mf/docker-ip

包简介

Finds suitable IP from `ifconfig` and then distribute this IP into hosts and docker file and allows revert changes.

README 文档

README

Latest Stable Version Total Downloads Build Status Coverage Status License

Finds suitable IP from ifconfig and then distribute this IP into hosts and docker file and allows revert changes.

How to use?

Install as dependency

composer require --dev mf/docker-ip

How to run it?

Show list of available commands

vendor/bin/docker-ip-console list

Usage:

vendor/bin/docker-ip-console [command] [arguments]

Available commands:

  help                          Displays help for a command
  list                          Lists commands
 docker-ip
  docker-ip:distributeIpToHost  Finds suitable IP from `ifconfig` and then distribute this IP into hosts and docker file
  docker-ip:revert              Reverts changes from `distributeIpToHost` in hosts and docker file

Distribute IP to Host

Finds suitable IP from ifconfig and then distribute this IP into hosts and docker file.

Usage:

vendor/bin/docker-ip-console docker-ip:distributeIpToHost [options]

Options:

   -d, --domain=DOMAIN              Your local domain
       --docker-file=DOCKER-FILE    Full path to your docker compose yml
       --hosts[=HOSTS]              Full path to your hosts file [default: "/etc/hosts"]
   -p, --placeholder[=PLACEHOLDER]  Placeholder used in DOCKER_FILE [default: "DOCKER_IP_PLACEHOLDER"]
   -h, --help                       Display this help message
   -q, --quiet                      Do not output any message
   -V, --version                    Display this application version
       --ansi                       Force ANSI output
       --no-ansi                    Disable ANSI output
   -n, --no-interaction             Do not ask any interactive question
   -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Example of /etc/hosts

127.0.0.1 your_domain

Example of DOCKER_FILE.yml

extra_hosts:
  - "your_domain:DOCKER_IP_PLACEHOLDER"

Revert changes

Reverts changes from distributeIpToHost in hosts and docker file

Usage:

vendor/bin/docker-ip-console docker-ip:revert [options]

Options:

       --docker-file=DOCKER-FILE  Full path to your docker compose yml
       --hosts[=HOSTS]            Full path to your hosts file [default: "/etc/hosts"]
   -h, --help                     Display this help message
   -q, --quiet                    Do not output any message
   -V, --version                  Display this application version
       --ansi                     Force ANSI output
       --no-ansi                  Disable ANSI output
   -n, --no-interaction           Do not ask any interactive question
   -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Example of /etc/hosts

#REPLACED_BY_DOCKER_IP 127.0.0.1 your_domain
{DOCKER_IP} your_domain

Example of DOCKER_FILE.yml

extra_hosts:
#REPLACED_BY_DOCKER_IP       - "your_domain:DOCKER_IP_PLACEHOLDER"
  - "your_domain:{DOCKER_IP}"

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固