当前位置: 首页 > 软件库 > 云计算 > >

compose

授权协议 Apache-2.0 License
开发语言 Google Go
所属分类 云计算
软件类型 开源软件
地区 不详
投 递 者 蓝泰平
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Docker Compose v2

Actions Status

Docker Compose is a tool for running multi-container applications on Dockerdefined using the Compose file format.A Compose file is used to define how the one or more containers that make upyour application are configured.Once you have a Compose file, you can create and start your application with asingle command: docker compose up.

About update and backward compatibility

Docker Compose V2 is a major version bump release of Docker compose. It has been completely rewriten from scratch in Golang (V1 was in Python). The installation instructions for Compose V2 differ from V1. V2 is not a standalone binary anymore and installation scripts will have to be adjusted. Some commands are different.

For a smooth transition from legacy docker-compose 1.xx, please consider installing compose-switch to translate docker-compose ... commands into Compose V2's docker compose .... . Also check V2's --compatibility flag.

Where to get Docker Compose

Windows and macOS

Docker Compose is included inDocker Desktopfor Windows and macOS.

Linux

You can download Docker Compose binaries from therelease page on this repository.

Rename the relevant binary for your OS to docker-compose and copy it to $HOME/.docker/cli-plugins

Or copy it into one of these folders for installing it system-wide:

  • /usr/local/lib/docker/cli-plugins OR /usr/local/libexec/docker/cli-plugins
  • /usr/lib/docker/cli-plugins OR /usr/libexec/docker/cli-plugins

(might require to make the downloaded file executable with chmod +x)

Quick Start

Using Docker Compose is basically a three-step process:

  1. Define your app's environment with a Dockerfile so it can bereproduced anywhere.
  2. Define the services that make up your app in docker-compose.yml sothey can be run together in an isolated environment.
  3. Lastly, run docker compose up and Compose will start and run your entireapp.

A Compose file looks like this:

services:
  web:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - .:/code
  redis:
    image: redis

Contributing

Want to help develop Docker Compose? Check out ourcontributing documentation.

If you find an issue, please report it on theissue tracker.

  • Compose项目是docker官方的开源项目,负责实现对docker容器集群的快速编排。其代码目前在http://github.com/docker/compose上开源。 Compose定位是定义和运行多个docker容器的应用,其前身是开源项目Fig。 通过前面章节的介绍,我们知道使用一个Dockerfile模板文件,可以让用户很方便的定义一个单独的应用容器。然而,在日常工作中,经常会碰到需

 相关资料
  • 问题内容: 我已经将我的Rails应用程序(本地开发机)迁移到Docker-Compose。除了Worker Rails实例(批处理)无法连接到Redis之外,其他所有组件都在工作。 在我的docker-compose.yml中 我认为Redis实例可通过Docker主机的IP获得。 通过0.0.0.0访问不起作用 我认为可以通过docker-machine IP访问: 编辑 在批处理实例中安装

  • 问题内容: TL; DR:为了允许一个容器通过自定义(非标准)端口使用另一个容器的服务,我必须如何更改以下内容? 我有一个非常普通的设置:Web应用程序的容器(Padrino [Ruby]),Postgres,Redis和一个排队框架(Sidekiq)。该Web应用程序带有其自定义的Dockerfile,其余服务来自标准映像(Postgres,Redis),或从Web应用程序装载数据(Sideki

  • 问题内容: 我在连接使用docker-compose启动的mysql docker容器时遇到一些问题。这是一篇很长的帖子(对不起!)。 这是我的docker-compose.yml文件: 然后: OK,所以现在我有一个正在运行的Docker容器运行器mysql:5.7。大!还是?在django应用中进行测试时,出现操作错误,提示不允许用户连接数据库。好吧,那么也许是我的django吗? 好的,也许

  • 问题内容: 我在Windows Home Edition上使用docker工具带。我正在尝试使用docker- compose将Node与Redis一起使用,当我使用来运行映像(在同一源目录中)时,它运行良好,但是当我尝试使用来运行Node时,我的Node应用程序不是’无法连接到Redis。 抛出: 我相信这是因为我的节点应用程序无法找到Redis,即使当我使用该应用程序正在运行时,我也无法在相应

  • 问题内容: 我正在开发一个项目,并希望使用Jenkins。该配置应由目标很少的简单对象完成: PHP Lint()工作可完美运行: Console Output But the executing of PHPDox is failing: 我在其他软件包中也遇到了同样的问题,这些软件包已 全局安装并从中使用(例如)。 我试图以另一种方式(例如)定义命令,但是它也无法 正常工作。 作品的直接执行。

  • 问题内容: 我在Kubernetes解决方案上使用Google Jenkins进行了Jenkins实例设置。我尚未更改Kubernetes Pod的任何设置。 当我触发一项新工作时,我可以成功地启动并运行所有内容,直到进行测试为止。 我的测试使用docker-compose。首先,我确保在实例上安装docker(1.5-1 + b1)和docker- compose(1.8.0-2)(我知道我可以

  • 问题内容: 我有一个docker撰写文件 而且我已经配置了詹金斯工作以通过调用另一个外壳文件“ environment.sh”来执行此文件,但是它尝试执行以下错误: 我如何在jenkins服务器中下载和配置docker-compose,也没有可用的插件!,适用于docker-compose 问题答案: $ PATH环境变量中可能不存在您。 首先,您应该删除所有冲突的内容- 在大多数Linux系统上

  • 问题内容: 我有一个包含differents变量的docker-compose.yml文件 在我的外壳中,我导出RegistryUrl和image_version 这在我的本地环境中有效(我正在使用boot2Docker),但在Jenkins中则无效。我发错消息了。 我尝试通过EnvInject插件传递env变量,但它也不起作用。 问题答案: 您在jenkins shell中的环境变量将不会自动导