Compare commits

..

29 Commits

Author SHA1 Message Date
Ulysses Souza
2bc4161526 Merge pull request #6726 from docker/bump-1.25.0-rc1
Bump 1.25.0-rc1
2019-05-24 00:33:04 +02:00
Ulysses Souza
8552e8e283 "Bump 1.25.0-rc1"
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-05-23 23:39:09 +02:00
Ulysses Souza
3803d35c03 Merge remote-tracking branch 'upstream/release' into bump-1.25.0-rc1 2019-05-23 23:38:30 +02:00
Ulysses Souza
d9fa8158c3 Merge pull request #6616 from docker/bump-1.24.0
Bump 1.24.0
2019-03-28 18:58:40 +01:00
Ulysses Souza
0aa590649c "Bump 1.24.0"
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-28 18:34:02 +01:00
Ulysses Souza
eb2fdf81b4 Bump docker-py 3.7.2
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-28 18:29:27 +01:00
Ulysses Souza
917c2701f2 Fix script for release file already present case
This avoids a:
"AttributeError: 'HTTPError' object has no attribute 'message'"

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-28 18:29:25 +01:00
Ulysses Souza
3a3288c54b Merge pull request #6609 from docker/bump-1.24.0-rc3
Bump 1.24.0-rc3
2019-03-22 15:51:21 +01:00
Ulysses Souza
428942498b "Bump 1.24.0-rc3"
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:52 +01:00
Ulysses Souza
c54341758a Fix bintray docker-compose link
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:22 +01:00
Ulysses Souza
662761dbba Fix typo on finalize
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:22 +01:00
Ulysses Souza
0e05ac6d2c Use os.system() instead of run_setup()
Use `os.system()` instead of `run_setup()` because the last
is not taking any effect

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:22 +01:00
Ulysses Souza
295dd9abda Bump docker-py version to 3.7.1
This docker-py version includes ssh fixes

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:21 +01:00
Ben Firshman
81b30c4380 Enable bootloader_ignore_signals in pyinstaller
Fixes #3347

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2019-03-22 15:15:19 +01:00
Michael Irwin
360753ecc1 Added test case to verify fix for #6525
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2019-03-22 15:15:18 +01:00
Michael Irwin
3fae0119ca Fix merging of compose files when network has None config
Signed-off-by: Michael Irwin <mikesir87@gmail.com>

Resolves #6525
2019-03-22 15:15:18 +01:00
Christopher Crone
0fdb9783cd circleci: Fix virtualenv version to 16.2.0
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-03-22 15:15:17 +01:00
Ulysses Souza
0dec6b5ff1 Fix Flake8 lint
This removes extra indentation and replace the use of `is` by `==` when
comparing strings

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:16 +01:00
Christopher Crone
e0412a2488 Dockerfile: Force version of virtualenv to 16.2.0
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-03-22 15:15:16 +01:00
Christopher Crone
3fc5c6f563 script.build.linux: Do not tail image build logs
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-03-22 15:15:16 +01:00
Christopher Crone
28310b3ba4 requirements-dev: Fix version of mock to 2.0.0
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-03-22 15:15:16 +01:00
Christopher Crone
4585db124a macOS: Bump Python and OpenSSL
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-03-22 15:15:16 +01:00
Ulysses Souza
1f9b20d97b Add --parallel to docker build's options in bash and zsh completion
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-22 15:15:13 +01:00
Djordje Lukic
82a89aef1c Support for credential_spec
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-03-22 15:15:12 +01:00
Harald Albers
3934617e37 Add bash completion for ps --all|-a
Signed-off-by: Harald Albers <github@albersweb.de>
2019-03-22 15:15:10 +01:00
Djordje Lukic
82db4fd4f2 Merge pull request #6455 from docker/bump-1.24.0-rc1
Bump 1.24.0-rc1
2019-01-14 17:54:34 +01:00
Djordje Lukic
0f3d4ddaa7 "Bump 1.24.0-rc1"
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-01-11 18:28:30 +01:00
Djordje Lukic
2007951731 "Bump 1.24.0-rc1"
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-01-11 17:57:05 +01:00
Djordje Lukic
60f8ce09f9 "Bump 1.24.0-rc1"
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-01-11 17:43:47 +01:00
118 changed files with 510 additions and 1077 deletions

View File

@@ -1,14 +0,0 @@
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.io to learn more
version: 2
cli:
server: https://app.fossa.io
fetcher: custom
project: git@github.com:docker/compose
analyze:
modules:
- name: .
type: pip
target: .
path: .

View File

@@ -1,9 +1,6 @@
---
name: Bug report
about: Report a bug encountered while using docker-compose
title: ''
labels: kind/bug
assignees: ''
---

View File

@@ -1,9 +1,6 @@
---
name: Feature request
about: Suggest an idea to improve Compose
title: ''
labels: kind/feature
assignees: ''
---

View File

@@ -1,9 +1,6 @@
---
name: Question about using Compose
about: This is not the appropriate channel
title: ''
labels: kind/question
assignees: ''
---

59
.github/stale.yml vendored
View File

@@ -1,59 +0,0 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 180
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- kind/feature
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label.
unmarkComment: >
This issue has been automatically marked as not stale anymore due to the recent activity.
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
This issue has been automatically closed because it had not recent activity during the stale period.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed

View File

@@ -1,6 +1,75 @@
Change log
==========
1.25.0 (2019-05-22)
-------------------
### Features
- Add tag `docker-compose:latest`
- Add `docker-compose:<version>-alpine` image/tag
- Add `docker-compose:<version>-debian` image/tag
- Bumped `docker-py` 4.0.1
- Supports `requests` up to 2.22.0 version
- Drops empty tag on `build:cache_from`
- `Dockerfile` now generates `libmusl` binaries for alpine
- Only pull images that can't be built
- Attribute `scale` can now accept `0` as a value
- Added `--quiet` build flag
- Added `--no-interpolate` to `docker-compose config`
- Bump OpenSSL for macOS build (`1.1.0j` to `1.1.1a`)
- Added `--no-rm` to `build` command
- Added support for `credential_spec`
- Resolve digests without pulling image
- Upgrade `pyyaml` to `4.2b1`
- Lowered severity to `warning` if `down` tries to remove nonexisting image
- Use improved API fields for project events when possible
- Update `setup.py` for modern `pypi/setuptools` and remove `pandoc` dependencies
- Removed `Dockerfile.armhf` which is no longer needed
### Bugfixes
- Fixed `--remove-orphans` when used with `up --no-start`
- Fixed `docker-compose ps --all`
- Fixed `depends_on` dependency recreation behavior
- Fixed bash completion for `build --memory`
- Fixed misleading warning concerning env vars when performing an `exec` command
- Fixed failure check in parallel_execute_watch
- Fixed race condition after pulling image
- Fixed error on duplicate mount points.
- Fixed merge on networks section
- Always connect Compose container to `stdin`
- Fixed the presentation of failed services on 'docker-compose start' when containers are not available
1.24.0 (2019-03-28)
-------------------

View File

@@ -1,9 +1,9 @@
ARG DOCKER_VERSION=18.09.7
ARG PYTHON_VERSION=3.7.4
ARG BUILD_ALPINE_VERSION=3.10
ARG DOCKER_VERSION=18.09.5
ARG PYTHON_VERSION=3.7.3
ARG BUILD_ALPINE_VERSION=3.9
ARG BUILD_DEBIAN_VERSION=slim-stretch
ARG RUNTIME_ALPINE_VERSION=3.10.1
ARG RUNTIME_DEBIAN_VERSION=stretch-20190812-slim
ARG RUNTIME_ALPINE_VERSION=3.9.3
ARG RUNTIME_DEBIAN_VERSION=stretch-20190326-slim
ARG BUILD_PLATFORM=alpine
@@ -30,18 +30,15 @@ RUN apk add --no-cache \
ENV BUILD_BOOTLOADER=1
FROM python:${PYTHON_VERSION}-${BUILD_DEBIAN_VERSION} AS build-debian
RUN apt-get update && apt-get install --no-install-recommends -y \
RUN apt-get update && apt-get install -y \
curl \
gcc \
git \
libc-dev \
libffi-dev \
libgcc-6-dev \
libssl-dev \
make \
openssl \
python2.7-dev \
zlib1g-dev
python2.7-dev
FROM build-${BUILD_PLATFORM} AS build
COPY docker-compose-entrypoint.sh /usr/local/bin/

View File

@@ -1,4 +1,4 @@
FROM s390x/alpine:3.10.1
FROM s390x/alpine:3.6
ARG COMPOSE_VERSION=1.16.1

15
Jenkinsfile vendored
View File

@@ -2,7 +2,7 @@
def buildImage = { String baseImage ->
def image
wrappedNode(label: "ubuntu && amd64 && !zfs", cleanWorkspace: true) {
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
stage("build image for \"${baseImage}\"") {
checkout(scm)
def imageName = "dockerbuildbot/compose:${baseImage}-${gitCommit()}"
@@ -29,9 +29,9 @@ def buildImage = { String baseImage ->
def get_versions = { String imageId, int number ->
def docker_versions
wrappedNode(label: "ubuntu && amd64 && !zfs") {
wrappedNode(label: "ubuntu && !zfs") {
def result = sh(script: """docker run --rm \\
--entrypoint=/code/.tox/py37/bin/python \\
--entrypoint=/code/.tox/py27/bin/python \\
${imageId} \\
/code/script/test/versions.py -n ${number} docker/docker-ce recent
""", returnStdout: true
@@ -48,14 +48,14 @@ def runTests = { Map settings ->
def imageName = settings.get("image", null)
if (!pythonVersions) {
throw new Exception("Need Python versions to test. e.g.: `runTests(pythonVersions: 'py37')`")
throw new Exception("Need Python versions to test. e.g.: `runTests(pythonVersions: 'py27,py37')`")
}
if (!dockerVersions) {
throw new Exception("Need Docker versions to test. e.g.: `runTests(dockerVersions: 'all')`")
}
{ ->
wrappedNode(label: "ubuntu && amd64 && !zfs", cleanWorkspace: true) {
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
stage("test python=${pythonVersions} / docker=${dockerVersions} / baseImage=${baseImage}") {
checkout(scm)
def storageDriver = sh(script: 'docker info | awk -F \': \' \'$1 == "Storage Driver" { print $2; exit }\'', returnStdout: true).trim()
@@ -82,10 +82,13 @@ def runTests = { Map settings ->
def testMatrix = [failFast: true]
def baseImages = ['alpine', 'debian']
def pythonVersions = ['py27', 'py37']
baseImages.each { baseImage ->
def imageName = buildImage(baseImage)
get_versions(imageName, 2).each { dockerVersion ->
testMatrix["${baseImage}_${dockerVersion}"] = runTests([baseImage: baseImage, image: imageName, dockerVersions: dockerVersion, pythonVersions: 'py37'])
pythonVersions.each { pyVersion ->
testMatrix["${baseImage}_${dockerVersion}_${pyVersion}"] = runTests([baseImage: baseImage, image: imageName, dockerVersions: dockerVersion, pythonVersions: pyVersion])
}
}
}

View File

@@ -6,11 +6,11 @@ Compose is a tool for defining and running multi-container Docker applications.
With Compose, you use a Compose file to configure your application's services.
Then, using a single command, you create and start all the services
from your configuration. To learn more about all the features of Compose
see [the list of features](https://github.com/docker/docker.github.io/blob/master/compose/index.md#features).
see [the list of features](https://github.com/docker/docker.github.io/blob/master/compose/overview.md#features).
Compose is great for development, testing, and staging environments, as well as
CI workflows. You can learn more about each case in
[Common Use Cases](https://github.com/docker/docker.github.io/blob/master/compose/index.md#common-use-cases).
[Common Use Cases](https://github.com/docker/docker.github.io/blob/master/compose/overview.md#common-use-cases).
Using Compose is basically a three-step process.

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.25.0dev'
__version__ = '1.25.0-rc1'

View File

@@ -41,9 +41,9 @@ for (name, code) in get_pairs():
def rainbow():
cs = ['cyan', 'yellow', 'green', 'magenta', 'blue',
cs = ['cyan', 'yellow', 'green', 'magenta', 'red', 'blue',
'intense_cyan', 'intense_yellow', 'intense_green',
'intense_magenta', 'intense_blue']
'intense_magenta', 'intense_red', 'intense_blue']
for c in cs:
yield globals()[c]

View File

@@ -13,9 +13,6 @@ from .. import config
from .. import parallel
from ..config.environment import Environment
from ..const import API_VERSIONS
from ..const import LABEL_CONFIG_FILES
from ..const import LABEL_ENVIRONMENT_FILE
from ..const import LABEL_WORKING_DIR
from ..project import Project
from .docker_client import docker_client
from .docker_client import get_tls_version
@@ -24,7 +21,7 @@ from .utils import get_version_info
log = logging.getLogger(__name__)
SILENT_COMMANDS = {
SILENT_COMMANDS = set((
'events',
'exec',
'kill',
@@ -37,7 +34,7 @@ SILENT_COMMANDS = {
'stop',
'top',
'unpause',
}
))
def project_from_options(project_dir, options, additional_options={}):
@@ -60,8 +57,7 @@ def project_from_options(project_dir, options, additional_options={}):
environment=environment,
override_dir=override_dir,
compatibility=options.get('--compatibility'),
interpolate=(not additional_options.get('--no-interpolate')),
environment_file=environment_file
interpolate=(not additional_options.get('--no-interpolate'))
)
@@ -129,7 +125,7 @@ def get_client(environment, verbose=False, version=None, tls_config=None, host=N
def get_project(project_dir, config_path=None, project_name=None, verbose=False,
host=None, tls_config=None, environment=None, override_dir=None,
compatibility=False, interpolate=True, environment_file=None):
compatibility=False, interpolate=True):
if not environment:
environment = Environment.from_env_file(project_dir)
config_details = config.find(project_dir, config_path, environment, override_dir)
@@ -149,30 +145,10 @@ def get_project(project_dir, config_path=None, project_name=None, verbose=False,
with errors.handle_connection_errors(client):
return Project.from_config(
project_name,
config_data,
client,
environment.get('DOCKER_DEFAULT_PLATFORM'),
execution_context_labels(config_details, environment_file),
project_name, config_data, client, environment.get('DOCKER_DEFAULT_PLATFORM')
)
def execution_context_labels(config_details, environment_file):
extra_labels = [
'{0}={1}'.format(LABEL_WORKING_DIR, os.path.abspath(config_details.working_dir)),
'{0}={1}'.format(LABEL_CONFIG_FILES, config_files_label(config_details)),
]
if environment_file is not None:
extra_labels.append('{0}={1}'.format(LABEL_ENVIRONMENT_FILE,
os.path.normpath(environment_file)))
return extra_labels
def config_files_label(config_details):
return ",".join(
map(str, (os.path.normpath(c.filename) for c in config_details.config_files)))
def get_project_name(working_dir, project_name=None, environment=None):
def normalize_name(name):
return re.sub(r'[^-_a-z0-9]', '', name.lower())

View File

@@ -2,32 +2,25 @@ from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import shutil
import os
import six
import texttable
from compose.cli import colors
if hasattr(shutil, "get_terminal_size"):
from shutil import get_terminal_size
else:
from backports.shutil_get_terminal_size import get_terminal_size
def get_tty_width():
try:
width, _ = get_terminal_size()
return int(width)
except OSError:
tty_size = os.popen('stty size 2> /dev/null', 'r').read().split()
if len(tty_size) != 2:
return 0
_, width = tty_size
return int(width)
class Formatter:
class Formatter(object):
"""Format tabular data for printing."""
@staticmethod
def table(headers, rows):
def table(self, headers, rows):
table = texttable.Texttable(max_width=get_tty_width())
table.set_cols_dtype(['t' for h in headers])
table.add_rows([headers] + rows)

View File

@@ -134,10 +134,7 @@ def build_thread(container, presenter, queue, log_args):
def build_thread_map(initial_containers, presenters, thread_args):
return {
container.id: build_thread(container, next(presenters), *thread_args)
# Container order is unspecified, so they are sorted by name in order to make
# container:presenter (log color) assignment deterministic when given a list of containers
# with the same names.
for container in sorted(initial_containers, key=lambda c: c.name)
for container in initial_containers
}
@@ -233,13 +230,7 @@ def watch_events(thread_map, event_stream, presenters, thread_args):
# Container crashed so we should reattach to it
if event['id'] in crashed_containers:
container = event['container']
if not container.is_restarting:
try:
container.attach_log_stream()
except APIError:
# Just ignore errors when reattaching to already crashed containers
pass
event['container'].attach_log_stream()
crashed_containers.remove(event['id'])
thread_map[event['id']] = build_thread(

View File

@@ -6,7 +6,6 @@ import contextlib
import functools
import json
import logging
import os
import pipes
import re
import subprocess
@@ -103,9 +102,9 @@ def dispatch():
options, handler, command_options = dispatcher.parse(sys.argv[1:])
setup_console_handler(console_handler,
options.get('--verbose'),
set_no_color_if_clicolor(options.get('--no-ansi')),
options.get('--no-ansi'),
options.get("--log-level"))
setup_parallel_logger(set_no_color_if_clicolor(options.get('--no-ansi')))
setup_parallel_logger(options.get('--no-ansi'))
if options.get('--no-ansi'):
command_options['--no-color'] = True
return functools.partial(perform_command, options, handler, command_options)
@@ -248,11 +247,6 @@ class TopLevelCommand(object):
def project_dir(self):
return self.toplevel_options.get('--project-directory') or '.'
@property
def toplevel_environment(self):
environment_file = self.toplevel_options.get('--env-file')
return Environment.from_env_file(self.project_dir, environment_file)
def build(self, options):
"""
Build or rebuild services.
@@ -264,17 +258,14 @@ class TopLevelCommand(object):
Usage: build [options] [--build-arg key=val...] [SERVICE...]
Options:
--build-arg key=val Set build-time variables for services.
--compress Compress the build context using gzip.
--force-rm Always remove intermediate containers.
-m, --memory MEM Set memory limit for the build container.
--no-cache Do not use cache when building the image.
--no-rm Do not remove intermediate containers after a successful build.
--parallel Build images in parallel.
--progress string Set type of progress output (auto, plain, tty).
EXPERIMENTAL flag for native builder.
To enable, run with COMPOSE_DOCKER_CLI_BUILD=1)
--pull Always attempt to pull a newer version of the image.
-m, --memory MEM Sets memory limit for the build container.
--build-arg key=val Set build-time variables for services.
--parallel Build images in parallel.
-q, --quiet Don't print anything to STDOUT
"""
service_names = options['SERVICE']
@@ -285,9 +276,9 @@ class TopLevelCommand(object):
'--build-arg is only supported when services are specified for API version < 1.25.'
' Please use a Compose file version > 2.2 or specify which services to build.'
)
build_args = resolve_build_args(build_args, self.toplevel_environment)
native_builder = self.toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD')
environment_file = options.get('--env-file')
environment = Environment.from_env_file(self.project_dir, environment_file)
build_args = resolve_build_args(build_args, environment)
self.project.build(
service_names=options['SERVICE'],
@@ -299,9 +290,7 @@ class TopLevelCommand(object):
build_args=build_args,
gzip=options.get('--compress', False),
parallel_build=options.get('--parallel', False),
silent=options.get('--quiet', False),
cli=native_builder,
progress=options.get('--progress'),
silent=options.get('--quiet', False)
)
def bundle(self, options):
@@ -440,8 +429,11 @@ class TopLevelCommand(object):
Compose file
-t, --timeout TIMEOUT Specify a shutdown timeout in seconds.
(default: 10)
--env-file PATH Specify an alternate environment file
"""
ignore_orphans = self.toplevel_environment.get_boolean('COMPOSE_IGNORE_ORPHANS')
environment_file = options.get('--env-file')
environment = Environment.from_env_file(self.project_dir, environment_file)
ignore_orphans = environment.get_boolean('COMPOSE_IGNORE_ORPHANS')
if ignore_orphans and options['--remove-orphans']:
raise UserError("COMPOSE_IGNORE_ORPHANS and --remove-orphans cannot be combined.")
@@ -497,8 +489,11 @@ class TopLevelCommand(object):
-e, --env KEY=VAL Set environment variables (can be used multiple times,
not supported in API < 1.25)
-w, --workdir DIR Path to workdir directory for this command.
--env-file PATH Specify an alternate environment file
"""
use_cli = not self.toplevel_environment.get_boolean('COMPOSE_INTERACTIVE_NO_CLI')
environment_file = options.get('--env-file')
environment = Environment.from_env_file(self.project_dir, environment_file)
use_cli = not environment.get_boolean('COMPOSE_INTERACTIVE_NO_CLI')
index = int(options.get('--index'))
service = self.project.get_service(options['SERVICE'])
detach = options.get('--detach')
@@ -521,7 +516,7 @@ class TopLevelCommand(object):
if IS_WINDOWS_PLATFORM or use_cli and not detach:
sys.exit(call_docker(
build_exec_command(options, container.id, command),
self.toplevel_options, self.toplevel_environment)
self.toplevel_options)
)
create_exec_options = {
@@ -621,7 +616,7 @@ class TopLevelCommand(object):
image_id,
size
])
print(Formatter.table(headers, rows))
print(Formatter().table(headers, rows))
def kill(self, options):
"""
@@ -667,7 +662,7 @@ class TopLevelCommand(object):
log_printer_from_project(
self.project,
containers,
set_no_color_if_clicolor(options['--no-color']),
options['--no-color'],
log_args,
event_stream=self.project.events(service_names=options['SERVICE'])).run()
@@ -755,7 +750,7 @@ class TopLevelCommand(object):
container.human_readable_state,
container.human_readable_ports,
])
print(Formatter.table(headers, rows))
print(Formatter().table(headers, rows))
def pull(self, options):
"""
@@ -890,12 +885,10 @@ class TopLevelCommand(object):
else:
command = service.options.get('command')
options['stdin_open'] = service.options.get('stdin_open', True)
container_options = build_one_off_container_options(options, detach, command)
run_one_off_container(
container_options, self.project, service, options,
self.toplevel_options, self.toplevel_environment
self.toplevel_options, self.project_dir
)
def scale(self, options):
@@ -995,7 +988,7 @@ class TopLevelCommand(object):
rows.append(process)
print(container.name)
print(Formatter.table(headers, rows))
print(Formatter().table(headers, rows))
def unpause(self, options):
"""
@@ -1056,6 +1049,7 @@ class TopLevelCommand(object):
container. Implies --abort-on-container-exit.
--scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the
`scale` setting in the Compose file if present.
--env-file PATH Specify an alternate environment file
"""
start_deps = not options['--no-deps']
always_recreate_deps = options['--always-recreate-deps']
@@ -1070,7 +1064,9 @@ class TopLevelCommand(object):
if detached and (cascade_stop or exit_value_from):
raise UserError("--abort-on-container-exit and -d cannot be combined.")
ignore_orphans = self.toplevel_environment.get_boolean('COMPOSE_IGNORE_ORPHANS')
environment_file = options.get('--env-file')
environment = Environment.from_env_file(self.project_dir, environment_file)
ignore_orphans = environment.get_boolean('COMPOSE_IGNORE_ORPHANS')
if ignore_orphans and remove_orphans:
raise UserError("COMPOSE_IGNORE_ORPHANS and --remove-orphans cannot be combined.")
@@ -1079,8 +1075,6 @@ class TopLevelCommand(object):
for excluded in [x for x in opts if options.get(x) and no_start]:
raise UserError('--no-start and {} cannot be combined.'.format(excluded))
native_builder = self.toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD')
with up_shutdown_context(self.project, service_names, timeout, detached):
warn_for_swarm_mode(self.project.client)
@@ -1100,7 +1094,6 @@ class TopLevelCommand(object):
reset_container_image=rebuild,
renew_anonymous_volumes=options.get('--renew-anon-volumes'),
silent=options.get('--quiet-pull'),
cli=native_builder,
)
try:
@@ -1125,7 +1118,7 @@ class TopLevelCommand(object):
log_printer = log_printer_from_project(
self.project,
attached_containers,
set_no_color_if_clicolor(options['--no-color']),
options['--no-color'],
{'follow': True},
cascade_stop,
event_stream=self.project.events(service_names=service_names))
@@ -1293,7 +1286,7 @@ def build_one_off_container_options(options, detach, command):
container_options = {
'command': command,
'tty': not (detach or options['-T'] or not sys.stdin.isatty()),
'stdin_open': options.get('stdin_open'),
'stdin_open': not detach,
'detach': detach,
}
@@ -1336,7 +1329,7 @@ def build_one_off_container_options(options, detach, command):
def run_one_off_container(container_options, project, service, options, toplevel_options,
toplevel_environment):
project_dir='.'):
if not options['--no-deps']:
deps = service.get_dependency_names()
if deps:
@@ -1365,7 +1358,9 @@ def run_one_off_container(container_options, project, service, options, toplevel
if options['--rm']:
project.client.remove_container(container.id, force=True, v=True)
use_cli = not toplevel_environment.get_boolean('COMPOSE_INTERACTIVE_NO_CLI')
environment_file = options.get('--env-file')
environment = Environment.from_env_file(project_dir, environment_file)
use_cli = not environment.get_boolean('COMPOSE_INTERACTIVE_NO_CLI')
signals.set_signal_handler_to_shutdown()
signals.set_signal_handler_to_hang_up()
@@ -1374,8 +1369,8 @@ def run_one_off_container(container_options, project, service, options, toplevel
if IS_WINDOWS_PLATFORM or use_cli:
service.connect_container_to_networks(container, use_network_aliases)
exit_code = call_docker(
get_docker_start_call(container_options, container.id),
toplevel_options, toplevel_environment
["start", "--attach", "--interactive", container.id],
toplevel_options
)
else:
operation = RunOperation(
@@ -1401,16 +1396,6 @@ def run_one_off_container(container_options, project, service, options, toplevel
sys.exit(exit_code)
def get_docker_start_call(container_options, container_id):
docker_call = ["start"]
if not container_options.get('detach'):
docker_call.append("--attach")
if container_options.get('stdin_open'):
docker_call.append("--interactive")
docker_call.append(container_id)
return docker_call
def log_printer_from_project(
project,
containers,
@@ -1465,7 +1450,7 @@ def exit_if(condition, message, exit_code):
raise SystemExit(exit_code)
def call_docker(args, dockeropts, environment):
def call_docker(args, dockeropts):
executable_path = find_executable('docker')
if not executable_path:
raise UserError(errors.docker_not_found_msg("Couldn't find `docker` binary."))
@@ -1495,7 +1480,7 @@ def call_docker(args, dockeropts, environment):
args = [executable_path] + tls_options + args
log.debug(" ".join(map(pipes.quote, args)))
return subprocess.call(args, env=environment)
return subprocess.call(args)
def parse_scale_args(options):
@@ -1603,7 +1588,3 @@ def warn_for_swarm_mode(client):
"To deploy your application across the swarm, "
"use `docker stack deploy`.\n"
)
def set_no_color_if_clicolor(no_color_flag):
return no_color_flag or os.environ.get('CLICOLOR') == "0"

View File

@@ -133,12 +133,12 @@ def generate_user_agent():
def human_readable_file_size(size):
suffixes = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', ]
order = int(math.log(size, 1000)) if size else 0
order = int(math.log(size, 2) / 10) if size else 0
if order >= len(suffixes):
order = len(suffixes) - 1
return '{0:.4g} {1}'.format(
size / pow(10, order * 3),
return '{0:.3g} {1}'.format(
size / float(1 << (order * 10)),
suffixes[order]
)

View File

@@ -615,7 +615,7 @@ class ServiceExtendsResolver(object):
config_path = self.get_extended_config_path(extends)
service_name = extends['service']
if config_path == os.path.abspath(self.config_file.filename):
if config_path == self.config_file.filename:
try:
service_config = self.config_file.get_service(service_name)
except KeyError:

View File

@@ -26,7 +26,7 @@ def split_env(env):
key = env
if re.search(r'\s', key):
raise ConfigurationError(
"environment variable name '{}' may not contain whitespace.".format(key)
"environment variable name '{}' may not contains whitespace.".format(key)
)
return key, value

View File

@@ -64,12 +64,12 @@ def interpolate_value(name, config_key, value, section, interpolator):
string=e.string))
except UnsetRequiredSubstitution as e:
raise ConfigurationError(
'Missing mandatory value for "{config_key}" option interpolating {value} '
'in {section} "{name}": {err}'.format(config_key=config_key,
value=value,
name=name,
section=section,
err=e.err)
'Missing mandatory value for "{config_key}" option in {section} "{name}": {err}'.format(
config_key=config_key,
name=name,
section=section,
err=e.err
)
)

View File

@@ -11,9 +11,6 @@ IS_WINDOWS_PLATFORM = (sys.platform == "win32")
LABEL_CONTAINER_NUMBER = 'com.docker.compose.container-number'
LABEL_ONE_OFF = 'com.docker.compose.oneoff'
LABEL_PROJECT = 'com.docker.compose.project'
LABEL_WORKING_DIR = 'com.docker.compose.project.working_dir'
LABEL_CONFIG_FILES = 'com.docker.compose.project.config_files'
LABEL_ENVIRONMENT_FILE = 'com.docker.compose.project.environment_file'
LABEL_SERVICE = 'com.docker.compose.service'
LABEL_NETWORK = 'com.docker.compose.network'
LABEL_VERSION = 'com.docker.compose.version'

View File

@@ -226,7 +226,7 @@ def check_remote_network_config(remote, local):
raise NetworkConfigChangedError(local.true_name, 'enable_ipv6')
local_labels = local.labels or {}
remote_labels = remote.get('Labels') or {}
remote_labels = remote.get('Labels', {})
for k in set.union(set(remote_labels.keys()), set(local_labels.keys())):
if k.startswith('com.docker.'): # We are only interested in user-specified labels
continue

View File

@@ -6,7 +6,6 @@ import logging
import operator
import re
from functools import reduce
from os import path
import enum
import six
@@ -83,7 +82,7 @@ class Project(object):
return labels
@classmethod
def from_config(cls, name, config_data, client, default_platform=None, extra_labels=[]):
def from_config(cls, name, config_data, client, default_platform=None):
"""
Construct a Project from a config.Config object.
"""
@@ -136,7 +135,6 @@ class Project(object):
pid_mode=pid_mode,
platform=service_dict.pop('platform', None),
default_platform=default_platform,
extra_labels=extra_labels,
**service_dict)
)
@@ -357,8 +355,7 @@ class Project(object):
return containers
def build(self, service_names=None, no_cache=False, pull=False, force_rm=False, memory=None,
build_args=None, gzip=False, parallel_build=False, rm=True, silent=False, cli=False,
progress=None):
build_args=None, gzip=False, parallel_build=False, rm=True, silent=False):
services = []
for service in self.get_services(service_names):
@@ -367,17 +364,8 @@ class Project(object):
elif not silent:
log.info('%s uses an image, skipping' % service.name)
if cli:
log.warning("Native build is an experimental feature and could change at any time")
if parallel_build:
log.warning("Flag '--parallel' is ignored when building with "
"COMPOSE_DOCKER_CLI_BUILD=1")
if gzip:
log.warning("Flag '--compress' is ignored when building with "
"COMPOSE_DOCKER_CLI_BUILD=1")
def build_service(service):
service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)
service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent)
if parallel_build:
_, errors = parallel.parallel_execute(
services,
@@ -521,12 +509,8 @@ class Project(object):
reset_container_image=False,
renew_anonymous_volumes=False,
silent=False,
cli=False,
):
if cli:
log.warning("Native build is an experimental feature and could change at any time")
self.initialize()
if not ignore_orphans:
self.find_orphan_containers(remove_orphans)
@@ -539,7 +523,7 @@ class Project(object):
include_deps=start_deps)
for svc in services:
svc.ensure_image_exists(do_build=do_build, silent=silent, cli=cli)
svc.ensure_image_exists(do_build=do_build, silent=silent)
plans = self._get_convergence_plans(
services, strategy, always_recreate_deps=always_recreate_deps)
@@ -809,15 +793,7 @@ def get_secrets(service, service_secrets, secret_defs):
)
)
secret_file = secret_def.get('file')
if not path.isfile(str(secret_file)):
log.warning(
"Service \"{service}\" uses an undefined secret file \"{secret_file}\", "
"the following file should be created \"{secret_file}\"".format(
service=service, secret_file=secret_file
)
)
secrets.append({'secret': secret, 'file': secret_file})
secrets.append({'secret': secret, 'file': secret_def.get('file')})
return secrets

View File

@@ -2,12 +2,10 @@ from __future__ import absolute_import
from __future__ import unicode_literals
import itertools
import json
import logging
import os
import re
import sys
import tempfile
from collections import namedtuple
from collections import OrderedDict
from operator import attrgetter
@@ -61,13 +59,9 @@ from .utils import parse_seconds_float
from .utils import truncate_id
from .utils import unique_everseen
if six.PY2:
import subprocess32 as subprocess
else:
import subprocess
log = logging.getLogger(__name__)
HOST_CONFIG_KEYS = [
'cap_add',
'cap_drop',
@@ -136,6 +130,7 @@ class NoSuchImageError(Exception):
ServiceName = namedtuple('ServiceName', 'project service number')
ConvergencePlan = namedtuple('ConvergencePlan', 'action containers')
@@ -171,21 +166,20 @@ class BuildAction(enum.Enum):
class Service(object):
def __init__(
self,
name,
client=None,
project='default',
use_networking=False,
links=None,
volumes_from=None,
network_mode=None,
networks=None,
secrets=None,
scale=1,
pid_mode=None,
default_platform=None,
extra_labels=[],
**options
self,
name,
client=None,
project='default',
use_networking=False,
links=None,
volumes_from=None,
network_mode=None,
networks=None,
secrets=None,
scale=1,
pid_mode=None,
default_platform=None,
**options
):
self.name = name
self.client = client
@@ -200,7 +194,6 @@ class Service(object):
self.scale_num = scale
self.default_platform = default_platform
self.options = options
self.extra_labels = extra_labels
def __repr__(self):
return '<Service: {}>'.format(self.name)
@@ -215,7 +208,7 @@ class Service(object):
for container in self.client.containers(
all=stopped,
filters=filters)])
)
)
if result:
return result
@@ -345,9 +338,9 @@ class Service(object):
raise OperationFailedError("Cannot create container for service %s: %s" %
(self.name, ex.explanation))
def ensure_image_exists(self, do_build=BuildAction.none, silent=False, cli=False):
def ensure_image_exists(self, do_build=BuildAction.none, silent=False):
if self.can_be_built() and do_build == BuildAction.force:
self.build(cli=cli)
self.build()
return
try:
@@ -363,7 +356,7 @@ class Service(object):
if do_build == BuildAction.skip:
raise NeedsBuildError(self)
self.build(cli=cli)
self.build()
log.warning(
"Image for service {} was built because it did not already exist. To "
"rebuild this image you must use `docker-compose build` or "
@@ -404,8 +397,8 @@ class Service(object):
return ConvergencePlan('start', containers)
if (
strategy is ConvergenceStrategy.always or
self._containers_have_diverged(containers)
strategy is ConvergenceStrategy.always or
self._containers_have_diverged(containers)
):
return ConvergencePlan('recreate', containers)
@@ -482,7 +475,6 @@ class Service(object):
container, timeout=timeout, attach_logs=not detached,
start_new_container=start, renew_anonymous_volumes=renew_anonymous_volumes
)
containers, errors = parallel_execute(
containers,
recreate,
@@ -624,8 +616,6 @@ class Service(object):
try:
container.start()
except APIError as ex:
if "driver failed programming external connectivity" in ex.explanation:
log.warn("Host is already in use by another container")
raise OperationFailedError("Cannot start service %s: %s" % (self.name, ex.explanation))
return container
@@ -706,11 +696,11 @@ class Service(object):
net_name = self.network_mode.service_name
pid_namespace = self.pid_mode.service_name
return (
self.get_linked_service_names() +
self.get_volumes_from_names() +
([net_name] if net_name else []) +
([pid_namespace] if pid_namespace else []) +
list(self.options.get('depends_on', {}).keys())
self.get_linked_service_names() +
self.get_volumes_from_names() +
([net_name] if net_name else []) +
([pid_namespace] if pid_namespace else []) +
list(self.options.get('depends_on', {}).keys())
)
def get_dependency_configs(self):
@@ -900,7 +890,7 @@ class Service(object):
container_options['labels'] = build_container_labels(
container_options.get('labels', {}),
self.labels(one_off=one_off) + self.extra_labels,
self.labels(one_off=one_off),
number,
self.config_hash if add_config_hash else None,
slug
@@ -1059,7 +1049,7 @@ class Service(object):
return [build_spec(secret) for secret in self.secrets]
def build(self, no_cache=False, pull=False, force_rm=False, memory=None, build_args_override=None,
gzip=False, rm=True, silent=False, cli=False, progress=None):
gzip=False, rm=True, silent=False):
output_stream = open(os.devnull, 'w')
if not silent:
output_stream = sys.stdout
@@ -1080,8 +1070,7 @@ class Service(object):
'Impossible to perform platform-targeted builds for API version < 1.35'
)
builder = self.client if not cli else _CLIBuilder(progress)
build_output = builder.build(
build_output = self.client.build(
path=path,
tag=self.image_name,
rm=rm,
@@ -1553,9 +1542,9 @@ def warn_on_masked_volume(volumes_option, container_volumes, service):
for volume in volumes_option:
if (
volume.external and
volume.internal in container_volumes and
container_volumes.get(volume.internal) != volume.external
volume.external and
volume.internal in container_volumes and
container_volumes.get(volume.internal) != volume.external
):
log.warning((
"Service \"{service}\" is using volume \"{volume}\" from the "
@@ -1602,7 +1591,6 @@ def build_mount(mount_spec):
read_only=mount_spec.read_only, consistency=mount_spec.consistency, **kwargs
)
# Labels
@@ -1657,7 +1645,6 @@ def format_environment(environment):
if isinstance(value, six.binary_type):
value = value.decode('utf-8')
return '{key}={value}'.format(key=key, value=value)
return [format_env(*item) for item in environment.items()]
@@ -1714,139 +1701,3 @@ def rewrite_build_path(path):
path = WINDOWS_LONGPATH_PREFIX + os.path.normpath(path)
return path
class _CLIBuilder(object):
def __init__(self, progress):
self._progress = progress
def build(self, path, tag=None, quiet=False, fileobj=None,
nocache=False, rm=False, timeout=None,
custom_context=False, encoding=None, pull=False,
forcerm=False, dockerfile=None, container_limits=None,
decode=False, buildargs=None, gzip=False, shmsize=None,
labels=None, cache_from=None, target=None, network_mode=None,
squash=None, extra_hosts=None, platform=None, isolation=None,
use_config_proxy=True):
"""
Args:
path (str): Path to the directory containing the Dockerfile
buildargs (dict): A dictionary of build arguments
cache_from (:py:class:`list`): A list of images used for build
cache resolution
container_limits (dict): A dictionary of limits applied to each
container created by the build process. Valid keys:
- memory (int): set memory limit for build
- memswap (int): Total memory (memory + swap), -1 to disable
swap
- cpushares (int): CPU shares (relative weight)
- cpusetcpus (str): CPUs in which to allow execution, e.g.,
``"0-3"``, ``"0,1"``
custom_context (bool): Optional if using ``fileobj``
decode (bool): If set to ``True``, the returned stream will be
decoded into dicts on the fly. Default ``False``
dockerfile (str): path within the build context to the Dockerfile
encoding (str): The encoding for a stream. Set to ``gzip`` for
compressing
extra_hosts (dict): Extra hosts to add to /etc/hosts in building
containers, as a mapping of hostname to IP address.
fileobj: A file object to use as the Dockerfile. (Or a file-like
object)
forcerm (bool): Always remove intermediate containers, even after
unsuccessful builds
isolation (str): Isolation technology used during build.
Default: `None`.
labels (dict): A dictionary of labels to set on the image
network_mode (str): networking mode for the run commands during
build
nocache (bool): Don't use the cache when set to ``True``
platform (str): Platform in the format ``os[/arch[/variant]]``
pull (bool): Downloads any updates to the FROM image in Dockerfiles
quiet (bool): Whether to return the status
rm (bool): Remove intermediate containers. The ``docker build``
command now defaults to ``--rm=true``, but we have kept the old
default of `False` to preserve backward compatibility
shmsize (int): Size of `/dev/shm` in bytes. The size must be
greater than 0. If omitted the system uses 64MB
squash (bool): Squash the resulting images layers into a
single layer.
tag (str): A tag to add to the final image
target (str): Name of the build-stage to build in a multi-stage
Dockerfile
timeout (int): HTTP timeout
use_config_proxy (bool): If ``True``, and if the docker client
configuration file (``~/.docker/config.json`` by default)
contains a proxy configuration, the corresponding environment
variables will be set in the container being built.
Returns:
A generator for the build output.
"""
if dockerfile:
dockerfile = os.path.join(path, dockerfile)
iidfile = tempfile.mktemp()
command_builder = _CommandBuilder()
command_builder.add_params("--build-arg", buildargs)
command_builder.add_list("--cache-from", cache_from)
command_builder.add_arg("--file", dockerfile)
command_builder.add_flag("--force-rm", forcerm)
command_builder.add_arg("--memory", container_limits.get("memory"))
command_builder.add_flag("--no-cache", nocache)
command_builder.add_arg("--progress", self._progress)
command_builder.add_flag("--pull", pull)
command_builder.add_arg("--tag", tag)
command_builder.add_arg("--target", target)
command_builder.add_arg("--iidfile", iidfile)
args = command_builder.build([path])
magic_word = "Successfully built "
appear = False
with subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True) as p:
while True:
line = p.stdout.readline()
if not line:
break
# Fix non ascii chars on Python2. To remove when #6890 is complete.
if six.PY2:
magic_word = str(magic_word)
if line.startswith(magic_word):
appear = True
yield json.dumps({"stream": line})
with open(iidfile) as f:
line = f.readline()
image_id = line.split(":")[1].strip()
os.remove(iidfile)
# In case of `DOCKER_BUILDKIT=1`
# there is no success message already present in the output.
# Since that's the way `Service::build` gets the `image_id`
# it has to be added `manually`
if not appear:
yield json.dumps({"stream": "{}{}\n".format(magic_word, image_id)})
class _CommandBuilder(object):
def __init__(self):
self._args = ["docker", "build"]
def add_arg(self, name, value):
if value:
self._args.extend([name, str(value)])
def add_flag(self, name, flag):
if flag:
self._args.extend([name])
def add_params(self, name, params):
if params:
for key, val in params.items():
self._args.extend([name, "{}={}".format(key, val)])
def add_list(self, name, values):
if values:
for val in values:
self._args.extend([name, val])
def build(self, args):
return self._args + args

View File

@@ -150,7 +150,7 @@ _docker_compose_config() {
;;
esac
COMPREPLY=( $( compgen -W "--hash --help --no-interpolate --quiet -q --resolve-image-digests --services --volumes" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--hash --help --quiet -q --resolve-image-digests --services --volumes" -- "$cur" ) )
}
@@ -184,10 +184,6 @@ _docker_compose_docker_compose() {
_filedir -d
return
;;
--env-file)
_filedir
return
;;
$(__docker_compose_to_extglob "$daemon_options_with_args") )
return
;;
@@ -616,7 +612,6 @@ _docker_compose() {
--tlsverify
"
local daemon_options_with_args="
--env-file
--file -f
--host -H
--project-directory

View File

@@ -12,7 +12,6 @@ end
complete -c docker-compose -s f -l file -r -d 'Specify an alternate compose file'
complete -c docker-compose -s p -l project-name -x -d 'Specify an alternate project name'
complete -c docker-compose -l env-file -r -d 'Specify an alternate environment file (default: .env)'
complete -c docker-compose -l verbose -d 'Show more output'
complete -c docker-compose -s H -l host -x -d 'Daemon socket to connect to'
complete -c docker-compose -l tls -d 'Use TLS; implied by --tlsverify'

View File

@@ -341,7 +341,6 @@ _docker-compose() {
'(- :)'{-h,--help}'[Get help]' \
'*'{-f,--file}"[${file_description}]:file:_files -g '*.yml'" \
'(-p --project-name)'{-p,--project-name}'[Specify an alternate project name (default: directory name)]:project name:' \
'--env-file[Specify an alternate environment file (default: .env)]:env-file:_files' \
"--compatibility[If set, Compose will attempt to convert keys in v3 files to their non-Swarm equivalent]" \
'(- :)'{-v,--version}'[Print version and exit]' \
'--verbose[Show more output]' \
@@ -360,7 +359,6 @@ _docker-compose() {
local -a relevant_compose_flags relevant_compose_repeatable_flags relevant_docker_flags compose_options docker_options
relevant_compose_flags=(
"--env-file"
"--file" "-f"
"--host" "-H"
"--project-name" "-p"

View File

@@ -1 +1 @@
pyinstaller==3.5
pyinstaller==3.4

View File

@@ -1,6 +1,6 @@
coverage==4.4.2
ddt==1.2.0
flake8==3.5.0
mock==3.0.5
mock==2.0.0
pytest==3.6.3
pytest-cov==2.5.1

View File

@@ -1,10 +1,9 @@
backports.shutil_get_terminal_size==1.0.0
backports.ssl-match-hostname==3.5.0.1; python_version < '3'
cached-property==1.3.0
certifi==2017.4.17
chardet==3.0.4
colorama==0.4.0; sys_platform == 'win32'
docker==4.1.0
docker==4.0.1
docker-pycreds==0.4.0
dockerpty==0.4.1
docopt==0.6.2
@@ -12,14 +11,14 @@ enum34==1.1.6; python_version < '3.4'
functools32==3.2.3.post2; python_version < '3.2'
idna==2.5
ipaddress==1.0.18
jsonschema==3.0.1
paramiko==2.6.0
jsonschema==2.6.0
paramiko==2.4.2
pypiwin32==219; sys_platform == 'win32' and python_version < '3.6'
pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6'
PySocks==1.6.7
PyYAML==4.2b1
requests==2.22.0
six==1.12.0
texttable==1.6.2
six==1.10.0
texttable==0.9.1
urllib3==1.24.2; python_version == '3.3'
websocket-client==0.32.0

View File

@@ -1,20 +0,0 @@
pipeline {
agent any
stages {
stage("License Scan") {
agent {
label 'ubuntu-1604-aufs-edge'
}
steps {
withCredentials([
string(credentialsId: 'fossa-api-key', variable: 'FOSSA_API_KEY')
]) {
checkout scm
sh "FOSSA_API_KEY='${FOSSA_API_KEY}' BRANCH_NAME='${env.BRANCH_NAME}' make -f script/fossa.mk fossa-analyze"
sh "FOSSA_API_KEY='${FOSSA_API_KEY}' make -f script/fossa.mk fossa-test"
}
}
}
}
}

View File

@@ -12,7 +12,6 @@ docker build -t "${TAG}" . \
--build-arg GIT_COMMIT="${DOCKER_COMPOSE_GITSHA}"
TMP_CONTAINER=$(docker create "${TAG}")
mkdir -p dist
ARCH=$(uname -m)
docker cp "${TMP_CONTAINER}":/usr/local/bin/docker-compose "dist/docker-compose-Linux-${ARCH}"
docker cp "${TMP_CONTAINER}":/usr/local/bin/docker-compose dist/docker-compose-Linux-x86_64
docker container rm -f "${TMP_CONTAINER}"
docker image rm -f "${TAG}"

View File

@@ -20,11 +20,10 @@ echo "${DOCKER_COMPOSE_GITSHA}" > compose/GITSHA
export PATH="${CODE_PATH}/pyinstaller:${PATH}"
if [ ! -z "${BUILD_BOOTLOADER}" ]; then
# Build bootloader for alpine; develop is the main branch
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller
# Build bootloader for alpine
git clone --single-branch --branch master https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller
cd /tmp/pyinstaller/bootloader
# Checkout commit corresponding to version in requirements-build
git checkout v3.5
git checkout v3.4
"${VENV}"/bin/python3 ./waf configure --no-lsb all
"${VENV}"/bin/pip3 install ..
cd "${CODE_PATH}"

View File

@@ -1,5 +1,7 @@
#!/bin/bash
set -x
curl -f -u$BINTRAY_USERNAME:$BINTRAY_API_KEY -X GET \
https://api.bintray.com/repos/docker-compose/${CIRCLE_BRANCH}

View File

@@ -1,16 +0,0 @@
# Variables for Fossa
BUILD_ANALYZER?=docker/fossa-analyzer
FOSSA_OPTS?=--option all-tags:true --option allow-unresolved:true
fossa-analyze:
docker run --rm -e FOSSA_API_KEY=$(FOSSA_API_KEY) \
-v $(CURDIR)/$*:/go/src/github.com/docker/compose \
-w /go/src/github.com/docker/compose \
$(BUILD_ANALYZER) analyze ${FOSSA_OPTS} --branch ${BRANCH_NAME}
# This command is used to run the fossa test command
fossa-test:
docker run -i -e FOSSA_API_KEY=$(FOSSA_API_KEY) \
-v $(CURDIR)/$*:/go/src/github.com/docker/compose \
-w /go/src/github.com/docker/compose \
$(BUILD_ANALYZER) test

View File

@@ -15,7 +15,7 @@
set -e
VERSION="1.24.0"
VERSION="1.25.0-rc1"
IMAGE="docker/compose:$VERSION"

View File

@@ -13,13 +13,13 @@ if ! [ ${DEPLOYMENT_TARGET} == "$(macos_version)" ]; then
SDK_SHA1=dd228a335194e3392f1904ce49aff1b1da26ca62
fi
OPENSSL_VERSION=1.1.1c
OPENSSL_VERSION=1.1.1a
OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
OPENSSL_SHA1=71b830a077276cbeccc994369538617a21bee808
OPENSSL_SHA1=8fae27b4f34445a5500c9dc50ae66b4d6472ce29
PYTHON_VERSION=3.7.4
PYTHON_VERSION=3.7.2
PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
PYTHON_SHA1=fb1d764be8a9dcd40f2f152a610a0ab04e0d0ed3
PYTHON_SHA1=0cd8e52d8ed1d0be12ac8e87a623a15df3a3b418
#
# Install prerequisites.

View File

@@ -31,33 +31,31 @@ def find_version(*file_paths):
install_requires = [
'cached-property >= 1.2.0, < 2',
'docopt >= 0.6.1, < 1',
'PyYAML >= 3.10, < 5',
'requests >= 2.20.0, < 3',
'texttable >= 0.9.0, < 2',
'websocket-client >= 0.32.0, < 1',
'docker[ssh] >= 3.7.0, < 5',
'dockerpty >= 0.4.1, < 1',
'docopt >= 0.6.1, < 0.7',
'PyYAML >= 3.10, < 4.3',
'requests >= 2.6.1, != 2.11.0, != 2.12.2, != 2.18.0, < 2.23',
'texttable >= 0.9.0, < 0.10',
'websocket-client >= 0.32.0, < 1.0',
'docker[ssh] >= 3.7.0, < 4.0.2',
'dockerpty >= 0.4.1, < 0.5',
'six >= 1.3.0, < 2',
'jsonschema >= 2.5.1, < 4',
'jsonschema >= 2.5.1, < 3',
]
tests_require = [
'pytest < 6',
'pytest',
]
if sys.version_info[:2] < (3, 4):
tests_require.append('mock >= 1.0.1, < 4')
tests_require.append('mock >= 1.0.1')
extras_require = {
':python_version < "3.2"': ['subprocess32 >= 3.5.4, < 4'],
':python_version < "3.4"': ['enum34 >= 1.0.4, < 2'],
':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5, < 4'],
':python_version < "3.3"': ['backports.shutil_get_terminal_size == 1.0.0',
'ipaddress >= 1.0.16, < 2'],
':sys_platform == "win32"': ['colorama >= 0.4, < 1'],
':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5'],
':python_version < "3.3"': ['ipaddress >= 1.0.16'],
':sys_platform == "win32"': ['colorama >= 0.4, < 0.5'],
'socks': ['PySocks >= 1.5.6, != 1.5.7, < 2'],
}

View File

@@ -20,7 +20,6 @@ import yaml
from docker import errors
from .. import mock
from ..helpers import BUSYBOX_IMAGE_WITH_TAG
from ..helpers import create_host_file
from compose.cli.command import get_project
from compose.config.errors import DuplicateOverrideFileFound
@@ -42,7 +41,7 @@ ProcessResult = namedtuple('ProcessResult', 'stdout stderr')
BUILD_CACHE_TEXT = 'Using cache'
BUILD_PULL_TEXT = 'Status: Image is up to date for busybox:1.27.2'
BUILD_PULL_TEXT = 'Status: Image is up to date for busybox:latest'
def start_process(base_dir, options):
@@ -64,12 +63,6 @@ def wait_on_process(proc, returncode=0):
return ProcessResult(stdout.decode('utf-8'), stderr.decode('utf-8'))
def dispatch(base_dir, options, project_options=None, returncode=0):
project_options = project_options or []
proc = start_process(base_dir, project_options + options)
return wait_on_process(proc, returncode=returncode)
def wait_on_condition(condition, delay=0.1, timeout=40):
start_time = time.time()
while not condition():
@@ -157,7 +150,9 @@ class CLITestCase(DockerClientTestCase):
return self._project
def dispatch(self, options, project_options=None, returncode=0):
return dispatch(self.base_dir, options, project_options, returncode)
project_options = project_options or []
proc = start_process(self.base_dir, project_options + options)
return wait_on_process(proc, returncode=returncode)
def execute(self, container, cmd):
# Remove once Hijack and CloseNotifier sign a peace treaty
@@ -271,7 +266,7 @@ class CLITestCase(DockerClientTestCase):
'volumes_from': ['service:other:rw'],
},
'other': {
'image': BUSYBOX_IMAGE_WITH_TAG,
'image': 'busybox:latest',
'command': 'top',
'volumes': ['/data'],
},
@@ -360,7 +355,7 @@ class CLITestCase(DockerClientTestCase):
'services': {
'web': {
'command': 'echo uwu',
'image': 'alpine:3.10.1',
'image': 'alpine:3.4',
'ports': ['3341/tcp', '4449/tcp']
}
},
@@ -559,7 +554,7 @@ class CLITestCase(DockerClientTestCase):
'services': {
'foo': {
'command': '/bin/true',
'image': 'alpine:3.10.1',
'image': 'alpine:3.7',
'scale': 3,
'restart': 'always:7',
'mem_limit': '300M',
@@ -644,7 +639,7 @@ class CLITestCase(DockerClientTestCase):
def test_pull_with_digest(self):
result = self.dispatch(['-f', 'digest.yml', 'pull', '--no-parallel'])
assert 'Pulling simple ({})...'.format(BUSYBOX_IMAGE_WITH_TAG) in result.stderr
assert 'Pulling simple (busybox:latest)...' in result.stderr
assert ('Pulling digest (busybox@'
'sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b520'
'04ee8502d)...') in result.stderr
@@ -655,7 +650,7 @@ class CLITestCase(DockerClientTestCase):
'pull', '--ignore-pull-failures', '--no-parallel']
)
assert 'Pulling simple ({})...'.format(BUSYBOX_IMAGE_WITH_TAG) in result.stderr
assert 'Pulling simple (busybox:latest)...' in result.stderr
assert 'Pulling another (nonexisting-image:latest)...' in result.stderr
assert ('repository nonexisting-image not found' in result.stderr or
'image library/nonexisting-image:latest not found' in result.stderr or
@@ -693,15 +688,15 @@ class CLITestCase(DockerClientTestCase):
self.base_dir = 'tests/fixtures/links-composefile'
result = self.dispatch(['pull', '--no-parallel', 'web'])
assert sorted(result.stderr.split('\n'))[1:] == [
'Pulling web (busybox:1.27.2)...',
'Pulling web (busybox:latest)...',
]
def test_pull_with_include_deps(self):
self.base_dir = 'tests/fixtures/links-composefile'
result = self.dispatch(['pull', '--no-parallel', '--include-deps', 'web'])
assert sorted(result.stderr.split('\n'))[1:] == [
'Pulling db (busybox:1.27.2)...',
'Pulling web (busybox:1.27.2)...',
'Pulling db (busybox:latest)...',
'Pulling web (busybox:latest)...',
]
def test_build_plain(self):
@@ -782,7 +777,6 @@ class CLITestCase(DockerClientTestCase):
]
assert not containers
@pytest.mark.xfail(True, reason='Flaky on local')
def test_build_rm(self):
containers = [
Container.from_ps(self.project.client, c)
@@ -1452,7 +1446,7 @@ class CLITestCase(DockerClientTestCase):
if v['Name'].split('/')[-1].startswith('{}_'.format(self.project.name))
]
assert set([v['Name'].split('/')[-1] for v in volumes]) == {volume_with_label}
assert set([v['Name'].split('/')[-1] for v in volumes]) == set([volume_with_label])
assert 'label_key' in volumes[0]['Labels']
assert volumes[0]['Labels']['label_key'] == 'label_val'
@@ -2117,7 +2111,7 @@ class CLITestCase(DockerClientTestCase):
for _, config in networks.items():
# TODO: once we drop support for API <1.24, this can be changed to:
# assert config['Aliases'] == [container.short_id]
aliases = set(config['Aliases'] or []) - {container.short_id}
aliases = set(config['Aliases'] or []) - set([container.short_id])
assert not aliases
@v2_only()
@@ -2137,7 +2131,7 @@ class CLITestCase(DockerClientTestCase):
for _, config in networks.items():
# TODO: once we drop support for API <1.24, this can be changed to:
# assert config['Aliases'] == [container.short_id]
aliases = set(config['Aliases'] or []) - {container.short_id}
aliases = set(config['Aliases'] or []) - set([container.short_id])
assert not aliases
assert self.lookup(container, 'app')
@@ -2675,7 +2669,7 @@ class CLITestCase(DockerClientTestCase):
container, = self.project.containers()
expected_template = ' container {} {}'
expected_meta_info = ['image=busybox:1.27.2', 'name=simple-composefile_simple_']
expected_meta_info = ['image=busybox:latest', 'name=simple-composefile_simple_']
assert expected_template.format('create', container.id) in lines[0]
assert expected_template.format('start', container.id) in lines[1]
@@ -2747,7 +2741,7 @@ class CLITestCase(DockerClientTestCase):
self.base_dir = 'tests/fixtures/extends'
self.dispatch(['up', '-d'], None)
assert set([s.name for s in self.project.services]) == {'mydb', 'myweb'}
assert set([s.name for s in self.project.services]) == set(['mydb', 'myweb'])
# Sort by name so we get [db, web]
containers = sorted(
@@ -2759,9 +2753,15 @@ class CLITestCase(DockerClientTestCase):
web = containers[1]
db_name = containers[0].name_without_project
assert set(get_links(web)) == {'db', db_name, 'extends_{}'.format(db_name)}
assert set(get_links(web)) == set(
['db', db_name, 'extends_{}'.format(db_name)]
)
expected_env = {"FOO=1", "BAR=2", "BAZ=2"}
expected_env = set([
"FOO=1",
"BAR=2",
"BAZ=2",
])
assert expected_env <= set(web.get('Config.Env'))
def test_top_services_not_running(self):
@@ -2816,8 +2816,8 @@ class CLITestCase(DockerClientTestCase):
result = self.dispatch(['images'])
assert 'busybox' in result.stdout
assert '_another_1' in result.stdout
assert '_simple_1' in result.stdout
assert 'multiple-composefiles_another_1' in result.stdout
assert 'multiple-composefiles_simple_1' in result.stdout
@mock.patch.dict(os.environ)
def test_images_tagless_image(self):
@@ -2865,4 +2865,4 @@ class CLITestCase(DockerClientTestCase):
assert re.search(r'foo1.+test[ \t]+dev', result.stdout) is not None
assert re.search(r'foo2.+test[ \t]+prod', result.stdout) is not None
assert re.search(r'foo3.+test[ \t]+latest', result.stdout) is not None
assert re.search(r'foo3.+_foo3[ \t]+latest', result.stdout) is not None

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: ls .

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: ls /thecakeisalie

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
LABEL com.docker.compose.test_image=true
ARG favorite_th_character
RUN echo "Favorite Touhou Character: ${favorite_th_character}"

View File

@@ -1,3 +1,3 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
LABEL com.docker.compose.test_image=true
CMD echo "success"

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox
# Report the memory (through the size of the group memory)
RUN echo "memory:" $(cat /sys/fs/cgroup/memory/memory.limit_in_bytes)

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
RUN echo a
CMD top

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
RUN echo b
CMD top

View File

@@ -1,7 +1,7 @@
version: '3.5'
services:
foo:
image: alpine:3.10.1
image: alpine:3.7
command: /bin/true
deploy:
replicas: 3

View File

@@ -1,4 +1,4 @@
IMAGE=alpine:3.10.1
IMAGE=alpine:3.4
COMMAND=echo uwu
PORT1=3341
PORT2=4449

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
LABEL com.docker.compose.test_image=true
VOLUME /data
CMD top

View File

@@ -1,10 +1,10 @@
web:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "sleep 100"
links:
- db
db:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "sleep 200"

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: echo simple
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: echo another

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
LABEL com.docker.compose.test_image=true
ENTRYPOINT ["printf"]
CMD ["default", "args"]

View File

@@ -1,2 +0,0 @@
WHEREAMI
DEFAULT_CONF_LOADED=true

View File

@@ -1 +0,0 @@
WHEREAMI=override

View File

@@ -1,6 +0,0 @@
version: '3.7'
services:
test:
image: busybox
env_file: .env.conf
entrypoint: env

View File

@@ -1,5 +1,5 @@
service:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
environment:

View File

@@ -2,7 +2,7 @@ version: "2.2"
services:
service:
image: busybox:1.27.2
image: busybox:latest
command: top
environment:

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c "echo hello && tail -f /dev/null"
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: /bin/false

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
expose:
- '3000'

View File

@@ -1,2 +1,2 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
RUN touch /foo

View File

@@ -8,4 +8,3 @@ services:
image: test:prod
foo3:
build: .
image: test:latest

View File

@@ -1,11 +1,11 @@
db:
image: busybox:1.27.2
image: busybox:latest
command: top
web:
image: busybox:1.27.2
image: busybox:latest
command: top
links:
- db:db
console:
image: busybox:1.27.2
image: busybox:latest
command: top

View File

@@ -1,9 +1,9 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
log_driver: "none"
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
log_driver: "json-file"
log_opt:

View File

@@ -1,12 +1,12 @@
version: "2"
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
logging:
driver: "none"
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
logging:
driver: "json-file"

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c "sleep 1 && echo hello && tail -f /dev/null"
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c "sleep 1 && echo test"

View File

@@ -1,7 +1,7 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c "echo hello && tail -f /dev/null"
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c "sleep 2 && echo world && /bin/false"
restart: "on-failure:2"

View File

@@ -1,3 +1,3 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c "echo w && echo x && echo y && echo z"

View File

@@ -1,3 +1,3 @@
definedinyamlnotyml:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,3 +1,3 @@
yetanother:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,10 +1,10 @@
version: "2"
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
networks:
default:

View File

@@ -2,17 +2,17 @@ version: "2"
services:
web:
image: alpine:3.10.1
image: alpine:3.7
command: top
networks: ["front"]
app:
image: alpine:3.10.1
image: alpine:3.7
command: top
networks: ["front", "back"]
links:
- "db:database"
db:
image: alpine:3.10.1
image: alpine:3.7
command: top
networks: ["back"]

View File

@@ -1,10 +1,10 @@
version: "2"
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
networks:
default:

View File

@@ -1,9 +1,9 @@
db:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
web:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
console:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,10 +1,10 @@
version: '2.2'
services:
web:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "sleep 200"
depends_on:
- db
db:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "sleep 200"

View File

@@ -6,5 +6,5 @@ services:
- other
other:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "top"

View File

@@ -1,10 +1,10 @@
web:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "sleep 100"
links:
- db
db:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: "sleep 200"

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: /bin/sleep 300
ports:
- '3000'

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
ports:
- '3000'

View File

@@ -1,7 +1,7 @@
version: '3.2'
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
ports:
- target: 3000

View File

@@ -1,5 +1,5 @@
with_image:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
with_build:
build: ../build-ctx/

View File

@@ -1,5 +1,5 @@
service:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
labels:

View File

@@ -1,4 +1,4 @@
service:
image: busybox:1.31.0-uclibc
image: busybox:latest
working_dir: /etc
command: /bin/true

View File

@@ -1,7 +1,7 @@
version: '2.2'
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
volumes:
- datastore:/data1

View File

@@ -1,2 +1,2 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest

View File

@@ -1,5 +1,5 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
digest:
image: busybox@sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b52004ee8502d

View File

@@ -1,6 +1,6 @@
simple:
image: busybox:1.27.2
image: busybox:latest
command: top
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,5 +1,5 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
another:
image: nonexisting-image:latest

View File

@@ -7,5 +7,5 @@ services:
from_simple:
image: simple
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,3 +1,3 @@
FROM busybox:1.27.2
FROM busybox:latest
LABEL com.docker.compose.test_image=true
CMD echo "success"

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
LABEL com.docker.compose.test_image=true
LABEL com.docker.compose.test_failing_image=true
# With the following label the container wil be cleaned up automatically

View File

@@ -3,8 +3,8 @@ version: "2"
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sleep 200
another:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sleep 200

View File

@@ -1,5 +1,5 @@
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command:
- sh
- '-c'

View File

@@ -1,2 +1,2 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
RUN touch /blah

View File

@@ -1,6 +1,6 @@
service_a:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
service_b:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,7 +1,7 @@
version: '2'
services:
simple:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: sh -c 'echo $$FOO'
environment:
FOO: ${BAR}

View File

@@ -1,4 +1,4 @@
service:
image: busybox:1.31.0-uclibc
image: busybox:latest
user: notauser
command: id

View File

@@ -1,13 +1,13 @@
version: "2.0"
services:
db:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
web:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top
depends_on:
- db
console:
image: busybox:1.31.0-uclibc
image: busybox:latest
command: top

View File

@@ -1,4 +1,4 @@
FROM busybox:1.31.0-uclibc
FROM busybox:latest
RUN echo something
CMD top

Some files were not shown because too many files have changed in this diff Show More