mirror of
https://github.com/docker/compose.git
synced 2025-07-31 01:24:15 +02:00
Run pre-commit on all files
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
fae6454661
commit
59d4f304ee
@ -202,7 +202,7 @@ The highlights:
|
|||||||
- There is a new `fig restart` command which restarts a service's containers.
|
- There is a new `fig restart` command which restarts a service's containers.
|
||||||
|
|
||||||
- Fig creates multiple containers in service by appending a number to the service name (e.g. `db_1`, `db_2`, etc). As a convenience, Fig will now give the first container an alias of the service name (e.g. `db`).
|
- Fig creates multiple containers in service by appending a number to the service name (e.g. `db_1`, `db_2`, etc). As a convenience, Fig will now give the first container an alias of the service name (e.g. `db`).
|
||||||
|
|
||||||
This link alias is also a valid hostname and added to `/etc/hosts` so you can connect to linked services using their hostname. For example, instead of resolving the environment variables `DB_PORT_5432_TCP_ADDR` and `DB_PORT_5432_TCP_PORT`, you could just use the hostname `db` and port `5432` directly.
|
This link alias is also a valid hostname and added to `/etc/hosts` so you can connect to linked services using their hostname. For example, instead of resolving the environment variables `DB_PORT_5432_TCP_ADDR` and `DB_PORT_5432_TCP_PORT`, you could just use the hostname `db` and port `5432` directly.
|
||||||
|
|
||||||
- Volume definitions now support `ro` mode, expanding `~` and expanding environment variables.
|
- Volume definitions now support `ro` mode, expanding `~` and expanding environment variables.
|
||||||
@ -250,7 +250,7 @@ Thanks @ryanbrainard and @d11wtq!
|
|||||||
------------------
|
------------------
|
||||||
|
|
||||||
- Fig now starts links when you run `fig run` or `fig up`.
|
- Fig now starts links when you run `fig run` or `fig up`.
|
||||||
|
|
||||||
For example, if you have a `web` service which depends on a `db` service, `fig run web ...` will start the `db` service.
|
For example, if you have a `web` service which depends on a `db` service, `fig run web ...` will start the `db` service.
|
||||||
|
|
||||||
- Environment variables can now be resolved from the environment that Fig is running in. Just specify it as a blank variable in your `fig.yml` and, if set, it'll be resolved:
|
- Environment variables can now be resolved from the environment that Fig is running in. Just specify it as a blank variable in your `fig.yml` and, if set, it'll be resolved:
|
||||||
@ -410,5 +410,3 @@ Big thanks to @tomstuart, @EnTeQuAk, @schickling, @aronasorman and @GeoffreyPlit
|
|||||||
------------------
|
------------------
|
||||||
|
|
||||||
Initial release.
|
Initial release.
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,4 +54,4 @@ Want to help build Compose? Check out our [contributing documentation](https://g
|
|||||||
Releasing
|
Releasing
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Releases are built by maintainers, following an outline of the [release process](https://github.com/docker/compose/blob/master/RELEASE_PROCESS.md).
|
Releases are built by maintainers, following an outline of the [release process](https://github.com/docker/compose/blob/master/RELEASE_PROCESS.md).
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from requests.exceptions import ConnectionError, SSLError
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import six
|
|
||||||
|
|
||||||
|
import six
|
||||||
|
from requests.exceptions import ConnectionError
|
||||||
|
from requests.exceptions import SSLError
|
||||||
|
|
||||||
|
from . import errors
|
||||||
|
from . import verbose_proxy
|
||||||
|
from .. import __version__
|
||||||
from .. import config
|
from .. import config
|
||||||
from ..project import Project
|
from ..project import Project
|
||||||
from ..service import ConfigError
|
from ..service import ConfigError
|
||||||
from .docopt_command import DocoptCommand
|
|
||||||
from .utils import call_silently, is_mac, is_ubuntu
|
|
||||||
from .docker_client import docker_client
|
from .docker_client import docker_client
|
||||||
from . import verbose_proxy
|
from .docopt_command import DocoptCommand
|
||||||
from . import errors
|
from .utils import call_silently
|
||||||
from .. import __version__
|
from .utils import is_mac
|
||||||
|
from .utils import is_ubuntu
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
import os
|
||||||
|
import ssl
|
||||||
|
|
||||||
from docker import Client
|
from docker import Client
|
||||||
from docker import tls
|
from docker import tls
|
||||||
import ssl
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def docker_client():
|
def docker_client():
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
import sys
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import sys
|
||||||
from inspect import getdoc
|
from inspect import getdoc
|
||||||
from docopt import docopt, DocoptExit
|
|
||||||
|
from docopt import docopt
|
||||||
|
from docopt import DocoptExit
|
||||||
|
|
||||||
|
|
||||||
def docopt_full_help(docstring, *args, **kwargs):
|
def docopt_full_help(docstring, *args, **kwargs):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import texttable
|
import texttable
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
import sys
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import sys
|
||||||
from itertools import cycle
|
from itertools import cycle
|
||||||
|
|
||||||
from .multiplexer import Multiplexer
|
|
||||||
from . import colors
|
from . import colors
|
||||||
|
from .multiplexer import Multiplexer
|
||||||
from .utils import split_buffer
|
from .utils import split_buffer
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,28 +1,32 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from inspect import getdoc
|
|
||||||
from operator import attrgetter
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
|
from inspect import getdoc
|
||||||
|
from operator import attrgetter
|
||||||
|
|
||||||
from docker.errors import APIError
|
|
||||||
import dockerpty
|
import dockerpty
|
||||||
|
from docker.errors import APIError
|
||||||
|
|
||||||
from .. import __version__
|
from .. import __version__
|
||||||
from .. import legacy
|
from .. import legacy
|
||||||
from ..const import DEFAULT_TIMEOUT
|
|
||||||
from ..project import NoSuchService, ConfigurationError
|
|
||||||
from ..service import BuildError, NeedsBuildError
|
|
||||||
from ..config import parse_environment
|
from ..config import parse_environment
|
||||||
|
from ..const import DEFAULT_TIMEOUT
|
||||||
from ..progress_stream import StreamOutputError
|
from ..progress_stream import StreamOutputError
|
||||||
|
from ..project import ConfigurationError
|
||||||
|
from ..project import NoSuchService
|
||||||
|
from ..service import BuildError
|
||||||
|
from ..service import NeedsBuildError
|
||||||
from .command import Command
|
from .command import Command
|
||||||
from .docopt_command import NoSuchCommand
|
from .docopt_command import NoSuchCommand
|
||||||
from .errors import UserError
|
from .errors import UserError
|
||||||
from .formatter import Formatter
|
from .formatter import Formatter
|
||||||
from .log_printer import LogPrinter
|
from .log_printer import LogPrinter
|
||||||
from .utils import yesno, get_version_info
|
from .utils import get_version_info
|
||||||
|
from .utils import yesno
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
console_handler = logging.StreamHandler(sys.stderr)
|
console_handler = logging.StreamHandler(sys.stderr)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .. import __version__
|
|
||||||
import datetime
|
import datetime
|
||||||
from docker import version as docker_py_version
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
|
||||||
import ssl
|
import ssl
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
from docker import version as docker_py_version
|
||||||
|
|
||||||
|
from .. import __version__
|
||||||
|
|
||||||
|
|
||||||
def yesno(prompt, default=None):
|
def yesno(prompt, default=None):
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
|
||||||
import functools
|
import functools
|
||||||
from itertools import chain
|
|
||||||
import logging
|
import logging
|
||||||
import pprint
|
import pprint
|
||||||
|
from itertools import chain
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
from .config import (
|
# flake8: noqa
|
||||||
DOCKER_CONFIG_KEYS,
|
from .config import ConfigDetails
|
||||||
ConfigDetails,
|
from .config import ConfigurationError
|
||||||
ConfigurationError,
|
from .config import DOCKER_CONFIG_KEYS
|
||||||
find,
|
from .config import find
|
||||||
load,
|
from .config import get_service_name_from_net
|
||||||
parse_environment,
|
from .config import load
|
||||||
merge_environment,
|
from .config import merge_environment
|
||||||
get_service_name_from_net,
|
from .config import parse_environment
|
||||||
) # flake8: noqa
|
|
||||||
|
@ -1,23 +1,19 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import yaml
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
import yaml
|
||||||
|
|
||||||
from compose.cli.utils import find_candidates_in_parent_dirs
|
from .errors import CircularReference
|
||||||
|
from .errors import ComposeFileNotFound
|
||||||
|
from .errors import ConfigurationError
|
||||||
from .interpolation import interpolate_environment_variables
|
from .interpolation import interpolate_environment_variables
|
||||||
from .errors import (
|
from .validation import validate_against_schema
|
||||||
ConfigurationError,
|
from .validation import validate_service_names
|
||||||
CircularReference,
|
from .validation import validate_top_level_object
|
||||||
ComposeFileNotFound,
|
from compose.cli.utils import find_candidates_in_parent_dirs
|
||||||
)
|
|
||||||
from .validation import (
|
|
||||||
validate_against_schema,
|
|
||||||
validate_service_names,
|
|
||||||
validate_top_level_object
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
DOCKER_CONFIG_KEYS = [
|
DOCKER_CONFIG_KEYS = [
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
from string import Template
|
from string import Template
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from .errors import ConfigurationError
|
from .errors import ConfigurationError
|
||||||
|
|
||||||
import logging
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from functools import wraps
|
import json
|
||||||
import os
|
import os
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
from docker.utils.ports import split_port
|
from docker.utils.ports import split_port
|
||||||
import json
|
from jsonschema import Draft4Validator
|
||||||
from jsonschema import Draft4Validator, FormatChecker, ValidationError
|
from jsonschema import FormatChecker
|
||||||
|
from jsonschema import ValidationError
|
||||||
|
|
||||||
from .errors import ConfigurationError
|
from .errors import ConfigurationError
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import six
|
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
from .const import LABEL_CONTAINER_NUMBER, LABEL_SERVICE
|
import six
|
||||||
|
|
||||||
|
from .const import LABEL_CONTAINER_NUMBER
|
||||||
|
from .const import LABEL_SERVICE
|
||||||
|
|
||||||
|
|
||||||
class Container(object):
|
class Container(object):
|
||||||
|
@ -2,7 +2,8 @@ import logging
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from .const import LABEL_VERSION
|
from .const import LABEL_VERSION
|
||||||
from .container import get_container_name, Container
|
from .container import Container
|
||||||
|
from .container import get_container_name
|
||||||
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import codecs
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import codecs
|
|
||||||
|
|
||||||
|
|
||||||
class StreamOutputError(Exception):
|
class StreamOutputError(Exception):
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from functools import reduce
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
|
|
||||||
from .config import get_service_name_from_net, ConfigurationError
|
from .config import ConfigurationError
|
||||||
from .const import DEFAULT_TIMEOUT, LABEL_PROJECT, LABEL_SERVICE, LABEL_ONE_OFF
|
from .config import get_service_name_from_net
|
||||||
|
from .const import DEFAULT_TIMEOUT
|
||||||
|
from .const import LABEL_ONE_OFF
|
||||||
|
from .const import LABEL_PROJECT
|
||||||
|
from .const import LABEL_SERVICE
|
||||||
from .container import Container
|
from .container import Container
|
||||||
from .legacy import check_for_legacy_containers
|
from .legacy import check_for_legacy_containers
|
||||||
from .service import Service
|
from .service import Service
|
||||||
|
@ -1,33 +1,37 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from collections import namedtuple
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
from collections import namedtuple
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
|
|
||||||
import six
|
import six
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
from docker.utils import create_host_config, LogConfig
|
from docker.utils import create_host_config
|
||||||
from docker.utils.ports import build_port_bindings, split_port
|
from docker.utils import LogConfig
|
||||||
|
from docker.utils.ports import build_port_bindings
|
||||||
|
from docker.utils.ports import split_port
|
||||||
|
|
||||||
from . import __version__
|
from . import __version__
|
||||||
from .config import DOCKER_CONFIG_KEYS, merge_environment
|
from .config import DOCKER_CONFIG_KEYS
|
||||||
from .const import (
|
from .config import merge_environment
|
||||||
DEFAULT_TIMEOUT,
|
from .config.validation import VALID_NAME_CHARS
|
||||||
LABEL_CONTAINER_NUMBER,
|
from .const import DEFAULT_TIMEOUT
|
||||||
LABEL_ONE_OFF,
|
from .const import LABEL_CONFIG_HASH
|
||||||
LABEL_PROJECT,
|
from .const import LABEL_CONTAINER_NUMBER
|
||||||
LABEL_SERVICE,
|
from .const import LABEL_ONE_OFF
|
||||||
LABEL_VERSION,
|
from .const import LABEL_PROJECT
|
||||||
LABEL_CONFIG_HASH,
|
from .const import LABEL_SERVICE
|
||||||
)
|
from .const import LABEL_VERSION
|
||||||
from .container import Container
|
from .container import Container
|
||||||
from .legacy import check_for_legacy_containers
|
from .legacy import check_for_legacy_containers
|
||||||
from .progress_stream import stream_output, StreamOutputError
|
from .progress_stream import stream_output
|
||||||
from .utils import json_hash, parallel_execute
|
from .progress_stream import StreamOutputError
|
||||||
from .config.validation import VALID_NAME_CHARS
|
from .utils import json_hash
|
||||||
|
from .utils import parallel_execute
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -3,10 +3,11 @@ import hashlib
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
from Queue import Empty
|
||||||
|
from Queue import Queue
|
||||||
|
from threading import Thread
|
||||||
|
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
from Queue import Queue, Empty
|
|
||||||
from threading import Thread
|
|
||||||
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Contributing to the Docker Compose documentation
|
# Contributing to the Docker Compose documentation
|
||||||
|
|
||||||
The documentation in this directory is part of the [https://docs.docker.com](https://docs.docker.com) website. Docker uses [the Hugo static generator](http://gohugo.io/overview/introduction/) to convert project Markdown files to a static HTML site.
|
The documentation in this directory is part of the [https://docs.docker.com](https://docs.docker.com) website. Docker uses [the Hugo static generator](http://gohugo.io/overview/introduction/) to convert project Markdown files to a static HTML site.
|
||||||
|
|
||||||
You don't need to be a Hugo expert to contribute to the compose documentation. If you are familiar with Markdown, you can modify the content in the `docs` files.
|
You don't need to be a Hugo expert to contribute to the compose documentation. If you are familiar with Markdown, you can modify the content in the `docs` files.
|
||||||
|
|
||||||
If you want to add a new file or change the location of the document in the menu, you do need to know a little more.
|
If you want to add a new file or change the location of the document in the menu, you do need to know a little more.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ If you want to add a new file or change the location of the document in the menu
|
|||||||
docker run --rm -it -e AWS_S3_BUCKET -e NOCACHE -p 8000:8000 -e DOCKERHOST "docs-base:test-tooling" hugo server --port=8000 --baseUrl=192.168.59.103 --bind=0.0.0.0
|
docker run --rm -it -e AWS_S3_BUCKET -e NOCACHE -p 8000:8000 -e DOCKERHOST "docs-base:test-tooling" hugo server --port=8000 --baseUrl=192.168.59.103 --bind=0.0.0.0
|
||||||
ERROR: 2015/06/13 MenuEntry's .Url is deprecated and will be removed in Hugo 0.15. Use .URL instead.
|
ERROR: 2015/06/13 MenuEntry's .Url is deprecated and will be removed in Hugo 0.15. Use .URL instead.
|
||||||
0 of 4 drafts rendered
|
0 of 4 drafts rendered
|
||||||
0 future content
|
0 future content
|
||||||
12 pages created
|
12 pages created
|
||||||
0 paginator pages created
|
0 paginator pages created
|
||||||
0 tags created
|
0 tags created
|
||||||
@ -52,7 +52,7 @@ The top of each Docker Compose documentation file contains TOML metadata. The me
|
|||||||
parent="smn_workw_compose"
|
parent="smn_workw_compose"
|
||||||
weight=2
|
weight=2
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
The metadata alone has this structure:
|
The metadata alone has this structure:
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ The metadata alone has this structure:
|
|||||||
parent="smn_workw_compose"
|
parent="smn_workw_compose"
|
||||||
weight=2
|
weight=2
|
||||||
+++
|
+++
|
||||||
|
|
||||||
The `[menu.main]` section refers to navigation defined [in the main Docker menu](https://github.com/docker/docs-base/blob/hugo/config.toml). This metadata says *add a menu item called* Extending services in Compose *to the menu with the* `smn_workdw_compose` *identifier*. If you locate the menu in the configuration, you'll find *Create multi-container applications* is the menu title.
|
The `[menu.main]` section refers to navigation defined [in the main Docker menu](https://github.com/docker/docs-base/blob/hugo/config.toml). This metadata says *add a menu item called* Extending services in Compose *to the menu with the* `smn_workdw_compose` *identifier*. If you locate the menu in the configuration, you'll find *Create multi-container applications* is the menu title.
|
||||||
|
|
||||||
You can move an article in the tree by specifying a new parent. You can shift the location of the item by changing its weight. Higher numbers are heavier and shift the item to the bottom of menu. Low or no numbers shift it up.
|
You can move an article in the tree by specifying a new parent. You can shift the location of the item by changing its weight. Higher numbers are heavier and shift the item to the bottom of menu. Low or no numbers shift it up.
|
||||||
@ -73,5 +73,5 @@ You can move an article in the tree by specifying a new parent. You can shift th
|
|||||||
## Other key documentation repositories
|
## Other key documentation repositories
|
||||||
|
|
||||||
The `docker/docs-base` repository contains [the Hugo theme and menu configuration](https://github.com/docker/docs-base). If you open the `Dockerfile` you'll see the `make docs` relies on this as a base image for building the Compose documentation.
|
The `docker/docs-base` repository contains [the Hugo theme and menu configuration](https://github.com/docker/docs-base). If you open the `Dockerfile` you'll see the `make docs` relies on this as a base image for building the Compose documentation.
|
||||||
|
|
||||||
The `docker/docs.docker.com` repository contains [build system for building the Docker documentation site](https://github.com/docker/docs.docker.com). Fork this repository to build the entire documentation site.
|
The `docker/docs.docker.com` repository contains [build system for building the Docker documentation site](https://github.com/docker/docs.docker.com). Fork this repository to build the entire documentation site.
|
||||||
|
@ -161,7 +161,7 @@ Now, when you run `docker-compose up`, Compose will pull a Redis image, build an
|
|||||||
web_1 | * Running on http://0.0.0.0:5000/
|
web_1 | * Running on http://0.0.0.0:5000/
|
||||||
web_1 | * Restarting with stat
|
web_1 | * Restarting with stat
|
||||||
|
|
||||||
If you're using [Docker Machine](https://docs.docker.com/machine), then `docker-machine ip MACHINE_VM` will tell you its address and you can open `http://MACHINE_VM_IP:5000` in a browser.
|
If you're using [Docker Machine](https://docs.docker.com/machine), then `docker-machine ip MACHINE_VM` will tell you its address and you can open `http://MACHINE_VM_IP:5000` in a browser.
|
||||||
|
|
||||||
If you're not using Boot2docker and are on linux, then the web app should now be listening on port 5000 on your Docker daemon host. If http://0.0.0.0:5000 doesn't resolve, you can also try localhost:5000.
|
If you're not using Boot2docker and are on linux, then the web app should now be listening on port 5000 on your Docker daemon host. If http://0.0.0.0:5000 doesn't resolve, you can also try localhost:5000.
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ weight=4
|
|||||||
|
|
||||||
You can run Compose on OS X and 64-bit Linux. It is currently not supported on
|
You can run Compose on OS X and 64-bit Linux. It is currently not supported on
|
||||||
the Windows operating system. To install Compose, you'll need to install Docker
|
the Windows operating system. To install Compose, you'll need to install Docker
|
||||||
first.
|
first.
|
||||||
|
|
||||||
Depending on how your system is configured, you may require `sudo` access to
|
Depending on how your system is configured, you may require `sudo` access to
|
||||||
install Compose. If your system requires `sudo`, you will receive "Permission
|
install Compose. If your system requires `sudo`, you will receive "Permission
|
||||||
@ -26,13 +26,13 @@ To install Compose, do the following:
|
|||||||
1. Install Docker Engine version 1.7.1 or greater:
|
1. Install Docker Engine version 1.7.1 or greater:
|
||||||
|
|
||||||
* <a href="https://docs.docker.com/installation/mac/" target="_blank">Mac OS X installation</a> (installs both Engine and Compose)
|
* <a href="https://docs.docker.com/installation/mac/" target="_blank">Mac OS X installation</a> (installs both Engine and Compose)
|
||||||
|
|
||||||
* <a href="https://docs.docker.com/installation/ubuntulinux/" target="_blank">Ubuntu installation</a>
|
* <a href="https://docs.docker.com/installation/ubuntulinux/" target="_blank">Ubuntu installation</a>
|
||||||
|
|
||||||
* <a href="https://docs.docker.com/installation/" target="_blank">other system installations</a>
|
* <a href="https://docs.docker.com/installation/" target="_blank">other system installations</a>
|
||||||
|
|
||||||
2. Mac OS X users are done installing. Others should continue to the next step.
|
2. Mac OS X users are done installing. Others should continue to the next step.
|
||||||
|
|
||||||
3. Go to the <a href="https://github.com/docker/compose/releases" target="_blank">repository release page</a>.
|
3. Go to the <a href="https://github.com/docker/compose/releases" target="_blank">repository release page</a>.
|
||||||
|
|
||||||
4. Enter the `curl` command in your termial.
|
4. Enter the `curl` command in your termial.
|
||||||
@ -40,9 +40,9 @@ To install Compose, do the following:
|
|||||||
The command has the following format:
|
The command has the following format:
|
||||||
|
|
||||||
curl -L https://github.com/docker/compose/releases/download/VERSION_NUM/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
|
curl -L https://github.com/docker/compose/releases/download/VERSION_NUM/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
|
||||||
|
|
||||||
If you have problems installing with `curl`, you can use `pip` instead: `pip install -U docker-compose`
|
If you have problems installing with `curl`, you can use `pip` instead: `pip install -U docker-compose`
|
||||||
|
|
||||||
4. Apply executable permissions to the binary:
|
4. Apply executable permissions to the binary:
|
||||||
|
|
||||||
$ chmod +x /usr/local/bin/docker-compose
|
$ chmod +x /usr/local/bin/docker-compose
|
||||||
@ -85,7 +85,7 @@ To uninstall Docker Compose if you installed using `curl`:
|
|||||||
To uninstall Docker Compose if you installed using `pip`:
|
To uninstall Docker Compose if you installed using `pip`:
|
||||||
|
|
||||||
$ pip uninstall docker-compose
|
$ pip uninstall docker-compose
|
||||||
|
|
||||||
>**Note**: If you get a "Permission denied" error using either of the above
|
>**Note**: If you get a "Permission denied" error using either of the above
|
||||||
>methods, you probably do not have the proper permissions to remove
|
>methods, you probably do not have the proper permissions to remove
|
||||||
>`docker-compose`. To force the removal, prepend `sudo` to either of the above
|
>`docker-compose`. To force the removal, prepend `sudo` to either of the above
|
||||||
|
@ -13,7 +13,7 @@ content_dir=(`ls -d /docs/content/*`)
|
|||||||
# 5 Change ](word) to ](/project/word)
|
# 5 Change ](word) to ](/project/word)
|
||||||
# 6 Change ](../../ to ](/project/
|
# 6 Change ](../../ to ](/project/
|
||||||
# 7 Change ](../ to ](/project/word)
|
# 7 Change ](../ to ](/project/word)
|
||||||
#
|
#
|
||||||
for i in "${content_dir[@]}"
|
for i in "${content_dir[@]}"
|
||||||
do
|
do
|
||||||
:
|
:
|
||||||
@ -51,11 +51,10 @@ done
|
|||||||
for i in "${docker_dir[@]}"
|
for i in "${docker_dir[@]}"
|
||||||
do
|
do
|
||||||
:
|
:
|
||||||
if [ -d $i ]
|
if [ -d $i ]
|
||||||
then
|
then
|
||||||
mv $i /docs/content/
|
mv $i /docs/content/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf /docs/content/docker
|
rm -rf /docs/content/docker
|
||||||
|
|
||||||
|
@ -93,4 +93,3 @@ guide</a>.
|
|||||||
- [Yaml file reference](yml.md)
|
- [Yaml file reference](yml.md)
|
||||||
- [Compose environment variables](env.md)
|
- [Compose environment variables](env.md)
|
||||||
- [Compose command line completion](completion.md)
|
- [Compose command line completion](completion.md)
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ Finally, you need to create the database. In another terminal, run:
|
|||||||
|
|
||||||
$ docker-compose run web rake db:create
|
$ docker-compose run web rake db:create
|
||||||
|
|
||||||
That's it. Your app should now be running on port 3000 on your Docker daemon. If you're using [Docker Machine](https://docs.docker.com/machine), then `docker-machine ip MACHINE_VM` returns the Docker host IP address.
|
That's it. Your app should now be running on port 3000 on your Docker daemon. If you're using [Docker Machine](https://docs.docker.com/machine), then `docker-machine ip MACHINE_VM` returns the Docker host IP address.
|
||||||
|
|
||||||
|
|
||||||
## More Compose documentation
|
## More Compose documentation
|
||||||
|
@ -20,4 +20,4 @@ Options:
|
|||||||
|
|
||||||
Services are built once and then tagged as `project_service`, e.g.,
|
Services are built once and then tagged as `project_service`, e.g.,
|
||||||
`composetest_db`. If you change a service's Dockerfile or the contents of its
|
`composetest_db`. If you change a service's Dockerfile or the contents of its
|
||||||
build directory, run `docker-compose build` to rebuild it.
|
build directory, run `docker-compose build` to rebuild it.
|
||||||
|
@ -5,7 +5,7 @@ description = "docker-compose Command Binary"
|
|||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, docker-compose"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, docker-compose"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
weight=-2
|
weight=-2
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ description = "Compose CLI reference"
|
|||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, reference"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, reference"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
identifier = "smn_compose_cli"
|
identifier = "smn_compose_cli"
|
||||||
parent = "smn_compose_ref"
|
parent = "smn_compose_ref"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ The following pages describe the usage information for the [docker-compose](/ref
|
|||||||
|
|
||||||
* [build](/reference/build.md)
|
* [build](/reference/build.md)
|
||||||
* [help](/reference/help.md)
|
* [help](/reference/help.md)
|
||||||
* [kill](/reference/kill.md)
|
* [kill](/reference/kill.md)
|
||||||
* [ps](/reference/ps.md)
|
* [ps](/reference/ps.md)
|
||||||
* [restart](/reference/restart.md)
|
* [restart](/reference/restart.md)
|
||||||
* [run](/reference/run.md)
|
* [run](/reference/run.md)
|
||||||
@ -23,7 +23,7 @@ The following pages describe the usage information for the [docker-compose](/ref
|
|||||||
* [up](/reference/up.md)
|
* [up](/reference/up.md)
|
||||||
* [logs](/reference/logs.md)
|
* [logs](/reference/logs.md)
|
||||||
* [port](/reference/port.md)
|
* [port](/reference/port.md)
|
||||||
* [pull](/reference/pull.md)
|
* [pull](/reference/pull.md)
|
||||||
* [rm](/reference/rm.md)
|
* [rm](/reference/rm.md)
|
||||||
* [scale](/reference/scale.md)
|
* [scale](/reference/scale.md)
|
||||||
* [stop](/reference/stop.md)
|
* [stop](/reference/stop.md)
|
||||||
|
@ -21,4 +21,4 @@ Options:
|
|||||||
Forces running containers to stop by sending a `SIGKILL` signal. Optionally the
|
Forces running containers to stop by sending a `SIGKILL` signal. Optionally the
|
||||||
signal can be passed, for example:
|
signal can be passed, for example:
|
||||||
|
|
||||||
$ docker-compose kill -s SIGINT
|
$ docker-compose kill -s SIGINT
|
||||||
|
@ -5,7 +5,7 @@ description = "Introduction to the CLI"
|
|||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, reference"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, reference"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
weight=-2
|
weight=-2
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
|
@ -20,4 +20,4 @@ Options:
|
|||||||
instances of a service [default: 1]
|
instances of a service [default: 1]
|
||||||
```
|
```
|
||||||
|
|
||||||
Prints the public port for a port binding.
|
Prints the public port for a port binding.
|
||||||
|
@ -15,4 +15,4 @@ parent = "smn_compose_cli"
|
|||||||
Usage: pull [options] [SERVICE...]
|
Usage: pull [options] [SERVICE...]
|
||||||
```
|
```
|
||||||
|
|
||||||
Pulls service images.
|
Pulls service images.
|
||||||
|
@ -27,7 +27,7 @@ Options:
|
|||||||
-T Disable pseudo-tty allocation. By default `docker-compose run` allocates a TTY.
|
-T Disable pseudo-tty allocation. By default `docker-compose run` allocates a TTY.
|
||||||
```
|
```
|
||||||
|
|
||||||
Runs a one-time command against a service. For example, the following command starts the `web` service and runs `bash` as its command.
|
Runs a one-time command against a service. For example, the following command starts the `web` service and runs `bash` as its command.
|
||||||
|
|
||||||
$ docker-compose run web bash
|
$ docker-compose run web bash
|
||||||
|
|
||||||
@ -52,7 +52,3 @@ This would open up an interactive PostgreSQL shell for the linked `db` container
|
|||||||
If you do not want the `run` command to start linked containers, specify the `--no-deps` flag:
|
If you do not want the `run` command to start linked containers, specify the `--no-deps` flag:
|
||||||
|
|
||||||
$ docker-compose run --no-deps web python manage.py shell
|
$ docker-compose run --no-deps web python manage.py shell
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,4 +18,4 @@ Sets the number of containers to run for a service.
|
|||||||
|
|
||||||
Numbers are specified as arguments in the form `service=num`. For example:
|
Numbers are specified as arguments in the form `service=num`. For example:
|
||||||
|
|
||||||
$ docker-compose scale web=2 worker=3
|
$ docker-compose scale web=2 worker=3
|
||||||
|
@ -13,7 +13,7 @@ weight=6
|
|||||||
# Quickstart Guide: Compose and Wordpress
|
# Quickstart Guide: Compose and Wordpress
|
||||||
|
|
||||||
You can use Compose to easily run Wordpress in an isolated environment built
|
You can use Compose to easily run Wordpress in an isolated environment built
|
||||||
with Docker containers.
|
with Docker containers.
|
||||||
|
|
||||||
## Define the project
|
## Define the project
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ your Dockerfile should be:
|
|||||||
ADD . /code
|
ADD . /code
|
||||||
|
|
||||||
This tells Docker how to build an image defining a container that contains PHP
|
This tells Docker how to build an image defining a container that contains PHP
|
||||||
and Wordpress.
|
and Wordpress.
|
||||||
|
|
||||||
Next you'll create a `docker-compose.yml` file that will start your web service
|
Next you'll create a `docker-compose.yml` file that will start your web service
|
||||||
and a separate MySQL instance:
|
and a separate MySQL instance:
|
||||||
@ -108,7 +108,7 @@ Second, `router.php` tells PHP's built-in web server how to run Wordpress:
|
|||||||
|
|
||||||
With those four files in place, run `docker-compose up` inside your Wordpress
|
With those four files in place, run `docker-compose up` inside your Wordpress
|
||||||
directory and it'll pull and build the needed images, and then start the web and
|
directory and it'll pull and build the needed images, and then start the web and
|
||||||
database containers. If you're using [Docker Machine](https://docs.docker.com/machine), then `docker-machine ip MACHINE_VM` gives you the machine address and you can open `http://MACHINE_VM_IP:8000` in a browser.
|
database containers. If you're using [Docker Machine](https://docs.docker.com/machine), then `docker-machine ip MACHINE_VM` gives you the machine address and you can open `http://MACHINE_VM_IP:8000` in a browser.
|
||||||
|
|
||||||
## More Compose documentation
|
## More Compose documentation
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ As with `docker run`, options specified in the Dockerfile (e.g., `CMD`,
|
|||||||
`EXPOSE`, `VOLUME`, `ENV`) are respected by default - you don't need to
|
`EXPOSE`, `VOLUME`, `ENV`) are respected by default - you don't need to
|
||||||
specify them again in `docker-compose.yml`.
|
specify them again in `docker-compose.yml`.
|
||||||
|
|
||||||
Values for configuration options can contain environment variables, e.g.
|
Values for configuration options can contain environment variables, e.g.
|
||||||
`image: postgres:${POSTGRES_VERSION}`. For more details, see the section on
|
`image: postgres:${POSTGRES_VERSION}`. For more details, see the section on
|
||||||
[variable substitution](#variable-substitution).
|
[variable substitution](#variable-substitution).
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ Custom DNS search domains. Can be a single value or a list.
|
|||||||
|
|
||||||
### devices
|
### devices
|
||||||
|
|
||||||
List of device mappings. Uses the same format as the `--device` docker
|
List of device mappings. Uses the same format as the `--device` docker
|
||||||
client create option.
|
client create option.
|
||||||
|
|
||||||
devices:
|
devices:
|
||||||
@ -433,4 +433,3 @@ dollar sign (`$$`).
|
|||||||
- [Command line reference](/reference)
|
- [Command line reference](/reference)
|
||||||
- [Compose environment variables](env.md)
|
- [Compose environment variables](env.md)
|
||||||
- [Compose command line completion](completion.md)
|
- [Compose command line completion](completion.md)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
coverage==3.7.1
|
||||||
|
flake8==2.3.0
|
||||||
|
git+https://github.com/pyinstaller/pyinstaller.git@12e40471c77f588ea5be352f7219c873ddaae056#egg=pyinstaller
|
||||||
mock >= 1.0.1
|
mock >= 1.0.1
|
||||||
nose==1.3.4
|
nose==1.3.4
|
||||||
git+https://github.com/pyinstaller/pyinstaller.git@12e40471c77f588ea5be352f7219c873ddaae056#egg=pyinstaller
|
|
||||||
unittest2==0.8.0
|
|
||||||
flake8==2.3.0
|
|
||||||
pep8==1.6.1
|
pep8==1.6.1
|
||||||
coverage==3.7.1
|
unittest2==0.8.0
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
PyYAML==3.10
|
PyYAML==3.10
|
||||||
jsonschema==2.5.1
|
|
||||||
docker-py==1.3.1
|
docker-py==1.3.1
|
||||||
dockerpty==0.3.4
|
dockerpty==0.3.4
|
||||||
docopt==0.6.1
|
docopt==0.6.1
|
||||||
|
jsonschema==2.5.1
|
||||||
requests==2.6.1
|
requests==2.6.1
|
||||||
six==1.7.3
|
six==1.7.3
|
||||||
texttable==0.8.2
|
texttable==0.8.2
|
||||||
|
7
setup.py
7
setup.py
@ -1,13 +1,16 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from setuptools import setup, find_packages
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from setuptools import find_packages
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
def read(*parts):
|
def read(*parts):
|
||||||
path = os.path.join(os.path.dirname(__file__), *parts)
|
path = os.path.join(os.path.dirname(__file__), *parts)
|
||||||
|
@ -3,4 +3,4 @@ dnebase:
|
|||||||
command: /bin/true
|
command: /bin/true
|
||||||
environment:
|
environment:
|
||||||
- FOO=1
|
- FOO=1
|
||||||
- BAR=1
|
- BAR=1
|
||||||
|
@ -5,4 +5,4 @@ dnechild:
|
|||||||
image: busybox
|
image: busybox
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
environment:
|
environment:
|
||||||
- BAR=2
|
- BAR=2
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
definedinyamlnotyml:
|
definedinyamlnotyml:
|
||||||
image: busybox:latest
|
image: busybox:latest
|
||||||
command: top
|
command: top
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from operator import attrgetter
|
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
|
import sys
|
||||||
|
from operator import attrgetter
|
||||||
|
|
||||||
from six import StringIO
|
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
from six import StringIO
|
||||||
|
|
||||||
from .testcases import DockerClientTestCase
|
from .testcases import DockerClientTestCase
|
||||||
from compose.cli.main import TopLevelCommand
|
|
||||||
from compose.cli.errors import UserError
|
from compose.cli.errors import UserError
|
||||||
|
from compose.cli.main import TopLevelCommand
|
||||||
from compose.project import NoSuchService
|
from compose.project import NoSuchService
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import unittest
|
import unittest
|
||||||
from mock import Mock
|
|
||||||
|
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
|
from mock import Mock
|
||||||
|
|
||||||
|
from .testcases import DockerClientTestCase
|
||||||
from compose import legacy
|
from compose import legacy
|
||||||
from compose.project import Project
|
from compose.project import Project
|
||||||
from .testcases import DockerClientTestCase
|
|
||||||
|
|
||||||
|
|
||||||
class UtilitiesTestCase(unittest.TestCase):
|
class UtilitiesTestCase(unittest.TestCase):
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .testcases import DockerClientTestCase
|
||||||
from compose import config
|
from compose import config
|
||||||
from compose.const import LABEL_PROJECT
|
from compose.const import LABEL_PROJECT
|
||||||
from compose.project import Project
|
|
||||||
from compose.container import Container
|
from compose.container import Container
|
||||||
from .testcases import DockerClientTestCase
|
from compose.project import Project
|
||||||
|
|
||||||
|
|
||||||
def build_service_dicts(service_config):
|
def build_service_dicts(service_config):
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from compose.project import Project
|
|
||||||
from .testcases import DockerClientTestCase
|
from .testcases import DockerClientTestCase
|
||||||
|
from compose.project import Project
|
||||||
|
|
||||||
|
|
||||||
class ResilienceTest(DockerClientTestCase):
|
class ResilienceTest(DockerClientTestCase):
|
||||||
|
@ -1,30 +1,28 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
import tempfile
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
from mock import patch
|
from mock import patch
|
||||||
import tempfile
|
from six import StringIO
|
||||||
import shutil
|
from six import text_type
|
||||||
from six import StringIO, text_type
|
|
||||||
|
|
||||||
from compose import __version__
|
|
||||||
from compose.const import (
|
|
||||||
LABEL_CONTAINER_NUMBER,
|
|
||||||
LABEL_ONE_OFF,
|
|
||||||
LABEL_PROJECT,
|
|
||||||
LABEL_SERVICE,
|
|
||||||
LABEL_VERSION,
|
|
||||||
)
|
|
||||||
from compose.service import (
|
|
||||||
ConfigError,
|
|
||||||
ConvergencePlan,
|
|
||||||
Service,
|
|
||||||
build_extra_hosts,
|
|
||||||
)
|
|
||||||
from compose.container import Container
|
|
||||||
from .testcases import DockerClientTestCase
|
from .testcases import DockerClientTestCase
|
||||||
|
from compose import __version__
|
||||||
|
from compose.const import LABEL_CONTAINER_NUMBER
|
||||||
|
from compose.const import LABEL_ONE_OFF
|
||||||
|
from compose.const import LABEL_PROJECT
|
||||||
|
from compose.const import LABEL_SERVICE
|
||||||
|
from compose.const import LABEL_VERSION
|
||||||
|
from compose.container import Container
|
||||||
|
from compose.service import build_extra_hosts
|
||||||
|
from compose.service import ConfigError
|
||||||
|
from compose.service import ConvergencePlan
|
||||||
|
from compose.service import Service
|
||||||
|
|
||||||
|
|
||||||
def create_and_start_container(service, **override_options):
|
def create_and_start_container(service, **override_options):
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import tempfile
|
|
||||||
import shutil
|
|
||||||
import os
|
|
||||||
|
|
||||||
from compose import config
|
import os
|
||||||
from compose.project import Project
|
import shutil
|
||||||
from compose.const import LABEL_CONFIG_HASH
|
import tempfile
|
||||||
|
|
||||||
from .testcases import DockerClientTestCase
|
from .testcases import DockerClientTestCase
|
||||||
|
from compose import config
|
||||||
|
from compose.const import LABEL_CONFIG_HASH
|
||||||
|
from compose.project import Project
|
||||||
|
|
||||||
|
|
||||||
class ProjectTestCase(DockerClientTestCase):
|
class ProjectTestCase(DockerClientTestCase):
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from compose.service import Service
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .. import unittest
|
||||||
|
from compose.cli.docker_client import docker_client
|
||||||
from compose.config.config import ServiceLoader
|
from compose.config.config import ServiceLoader
|
||||||
from compose.const import LABEL_PROJECT
|
from compose.const import LABEL_PROJECT
|
||||||
from compose.cli.docker_client import docker_client
|
|
||||||
from compose.progress_stream import stream_output
|
from compose.progress_stream import stream_output
|
||||||
from .. import unittest
|
from compose.service import Service
|
||||||
|
|
||||||
|
|
||||||
class DockerClientTestCase(unittest.TestCase):
|
class DockerClientTestCase(unittest.TestCase):
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from tests import unittest
|
|
||||||
|
|
||||||
from compose.cli import docker_client
|
from compose.cli import docker_client
|
||||||
|
from tests import unittest
|
||||||
|
|
||||||
|
|
||||||
class DockerClientTestCase(unittest.TestCase):
|
class DockerClientTestCase(unittest.TestCase):
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from tests import unittest
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from compose.cli import verbose_proxy
|
from compose.cli import verbose_proxy
|
||||||
|
from tests import unittest
|
||||||
|
|
||||||
|
|
||||||
class VerboseProxyTestCase(unittest.TestCase):
|
class VerboseProxyTestCase(unittest.TestCase):
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from .. import unittest
|
|
||||||
|
|
||||||
import docker
|
import docker
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
from .. import unittest
|
||||||
from compose.cli.docopt_command import NoSuchCommand
|
from compose.cli.docopt_command import NoSuchCommand
|
||||||
from compose.cli.errors import UserError
|
from compose.cli.errors import UserError
|
||||||
from compose.cli.main import TopLevelCommand
|
from compose.cli.main import TopLevelCommand
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
from .. import unittest
|
|
||||||
|
|
||||||
|
import mock
|
||||||
|
|
||||||
|
from .. import unittest
|
||||||
from compose.config import config
|
from compose.config import config
|
||||||
from compose.config.errors import ConfigurationError
|
from compose.config.errors import ConfigurationError
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from .. import unittest
|
|
||||||
|
|
||||||
import mock
|
|
||||||
import docker
|
import docker
|
||||||
|
import mock
|
||||||
|
|
||||||
|
from .. import unittest
|
||||||
from compose.container import Container
|
from compose.container import Container
|
||||||
from compose.container import get_container_name
|
from compose.container import get_container_name
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from compose.config.interpolation import interpolate, InvalidInterpolation
|
|
||||||
from compose.config.interpolation import BlankDefaultDict as bddict
|
from compose.config.interpolation import BlankDefaultDict as bddict
|
||||||
|
from compose.config.interpolation import interpolate
|
||||||
|
from compose.config.interpolation import InvalidInterpolation
|
||||||
|
|
||||||
|
|
||||||
class InterpolationTest(unittest.TestCase):
|
class InterpolationTest(unittest.TestCase):
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from compose.cli.log_printer import LogPrinter
|
|
||||||
from .. import unittest
|
from .. import unittest
|
||||||
|
from compose.cli.log_printer import LogPrinter
|
||||||
|
|
||||||
|
|
||||||
class LogPrinterTest(unittest.TestCase):
|
class LogPrinterTest(unittest.TestCase):
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from tests import unittest
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from six import StringIO
|
from six import StringIO
|
||||||
|
|
||||||
from compose import progress_stream
|
from compose import progress_stream
|
||||||
|
from tests import unittest
|
||||||
|
|
||||||
|
|
||||||
class ProgressStreamTestCase(unittest.TestCase):
|
class ProgressStreamTestCase(unittest.TestCase):
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from .. import unittest
|
|
||||||
from compose.service import Service
|
|
||||||
from compose.project import Project
|
|
||||||
from compose.container import Container
|
|
||||||
from compose.const import LABEL_SERVICE
|
|
||||||
|
|
||||||
import mock
|
|
||||||
import docker
|
import docker
|
||||||
|
import mock
|
||||||
|
|
||||||
|
from .. import unittest
|
||||||
|
from compose.const import LABEL_SERVICE
|
||||||
|
from compose.container import Container
|
||||||
|
from compose.project import Project
|
||||||
|
from compose.service import Service
|
||||||
|
|
||||||
|
|
||||||
class ProjectTest(unittest.TestCase):
|
class ProjectTest(unittest.TestCase):
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
from .. import unittest
|
|
||||||
import mock
|
|
||||||
|
|
||||||
import docker
|
import docker
|
||||||
|
import mock
|
||||||
from docker.utils import LogConfig
|
from docker.utils import LogConfig
|
||||||
|
|
||||||
from compose.service import Service
|
from .. import unittest
|
||||||
|
from compose.const import LABEL_ONE_OFF
|
||||||
|
from compose.const import LABEL_PROJECT
|
||||||
|
from compose.const import LABEL_SERVICE
|
||||||
from compose.container import Container
|
from compose.container import Container
|
||||||
from compose.const import LABEL_SERVICE, LABEL_PROJECT, LABEL_ONE_OFF
|
from compose.service import build_volume_binding
|
||||||
from compose.service import (
|
from compose.service import ConfigError
|
||||||
ConfigError,
|
from compose.service import get_container_data_volumes
|
||||||
NeedsBuildError,
|
from compose.service import merge_volume_bindings
|
||||||
NoSuchImageError,
|
from compose.service import NeedsBuildError
|
||||||
build_volume_binding,
|
from compose.service import NoSuchImageError
|
||||||
get_container_data_volumes,
|
from compose.service import parse_repository_tag
|
||||||
merge_volume_bindings,
|
from compose.service import parse_volume_spec
|
||||||
parse_repository_tag,
|
from compose.service import Service
|
||||||
parse_volume_spec,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ServiceTest(unittest.TestCase):
|
class ServiceTest(unittest.TestCase):
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from compose.project import sort_service_dicts, DependencyError
|
|
||||||
from .. import unittest
|
from .. import unittest
|
||||||
|
from compose.project import DependencyError
|
||||||
|
from compose.project import sort_service_dicts
|
||||||
|
|
||||||
|
|
||||||
class SortServiceTest(unittest.TestCase):
|
class SortServiceTest(unittest.TestCase):
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from compose.cli.utils import split_buffer
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .. import unittest
|
from .. import unittest
|
||||||
|
from compose.cli.utils import split_buffer
|
||||||
|
|
||||||
|
|
||||||
class SplitBufferTest(unittest.TestCase):
|
class SplitBufferTest(unittest.TestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user