Merge branch 'master' into 1.26.x

This commit is contained in:
Ulysses Souza 2020-04-27 19:56:02 +02:00
commit 83371df2d1
14 changed files with 99 additions and 46 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,6 +1,68 @@
Change log
==========
1.25.5 (2020-02-04)
-------------------
### Features
- Bump OpenSSL from 1.1.1d to 1.1.1f
- Add 3.8 compose version
1.25.4 (2020-01-23)
-------------------
### Bugfixes
- Fix CI script to enforce the minimal MacOS version to 10.11
- Fix docker-compose exec for keys with no value
1.25.3 (2020-01-23)
-------------------
### Bugfixes
- Fix CI script to enforce the compilation with Python3
- Fix binary's sha256 in the release page
1.25.2 (2020-01-20)
-------------------
### Features
- Allow compatibility option with `COMPOSE_COMPATIBILITY` environment variable
- Bump PyInstaller from 3.5 to 3.6
- Bump pysocks from 1.6.7 to 1.7.1
- Bump websocket-client from 0.32.0 to 0.57.0
- Bump urllib3 from 1.24.2 to 1.25.7
- Bump jsonschema from 3.0.1 to 3.2.0
- Bump PyYAML from 4.2b1 to 5.3
- Bump certifi from 2017.4.17 to 2019.11.28
- Bump coverage from 4.5.4 to 5.0.3
- Bump paramiko from 2.6.0 to 2.7.1
- Bump cached-property from 1.3.0 to 1.5.1
- Bump minor Linux and MacOSX dependencies
### Bugfixes
- Validate version format on formats 2+
- Assume infinite terminal width when not running in a terminal
1.25.1 (2020-01-06)
-------------------

View File

@ -1,9 +1,9 @@
ARG DOCKER_VERSION=19.03.5
ARG PYTHON_VERSION=3.7.6
ARG DOCKER_VERSION=19.03.8
ARG PYTHON_VERSION=3.7.7
ARG BUILD_ALPINE_VERSION=3.11
ARG BUILD_DEBIAN_VERSION=slim-stretch
ARG RUNTIME_ALPINE_VERSION=3.11.3
ARG RUNTIME_DEBIAN_VERSION=stretch-20191224-slim
ARG RUNTIME_ALPINE_VERSION=3.11.5
ARG RUNTIME_DEBIAN_VERSION=stretch-20200414-slim
ARG BUILD_PLATFORM=alpine

View File

@ -1,15 +0,0 @@
FROM s390x/alpine:3.10.1
ARG COMPOSE_VERSION=1.16.1
RUN apk add --update --no-cache \
python \
py-pip \
&& pip install --no-cache-dir docker-compose==$COMPOSE_VERSION \
&& rm -rf /var/cache/apk/*
WORKDIR /data
VOLUME /data
ENTRYPOINT ["docker-compose"]

2
Jenkinsfile vendored
View File

@ -1,6 +1,6 @@
#!groovy
def dockerVersions = ['19.03.5']
def dockerVersions = ['19.03.8']
def baseImages = ['alpine', 'debian']
def pythonVersions = ['py37']

View File

@ -2,7 +2,7 @@ Docker Compose
==============
![Docker Compose](logo.png?raw=true "Docker Compose Logo")
## :exclamation: The docker-compose project announces that as Python 2 reaches it's EOL, versions 1.25.x will be the last to support it. For more information, please refer to this [issue](https://github.com/docker/compose/issues/6890).
## :exclamation: The docker-compose project announces that as Python 2 has reached it's EOL, versions 1.26.x will be the last to support it. For more information, please refer to this [issue](https://github.com/docker/compose/issues/6890).
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.

View File

@ -1,6 +1,6 @@
#!groovy
def dockerVersions = ['19.03.5', '18.09.9']
def dockerVersions = ['19.03.8', '18.09.9']
def baseImages = ['alpine', 'debian']
def pythonVersions = ['py37']

View File

@ -9,6 +9,7 @@ import ssl
import subprocess
import sys
import distro
import docker
import six
@ -73,7 +74,7 @@ def is_mac():
def is_ubuntu():
return platform.system() == 'Linux' and platform.linux_distribution()[0] == 'Ubuntu'
return platform.system() == 'Linux' and distro.linux_distribution()[0] == 'Ubuntu'
def is_windows():

View File

@ -505,9 +505,7 @@ def load_services(config_details, config_file, compatibility=False, interpolate=
file.get_service_dicts() for file in config_details.config_files
]
service_config = service_configs[0]
for next_config in service_configs[1:]:
service_config = merge_services(service_config, next_config)
service_config = functools.reduce(merge_services, service_configs)
return build_services(service_config)

View File

@ -1792,6 +1792,7 @@ class _CLIBuilder(object):
command_builder.add_list("--cache-from", cache_from)
command_builder.add_arg("--file", dockerfile)
command_builder.add_flag("--force-rm", forcerm)
command_builder.add_params("--label", labels)
command_builder.add_arg("--memory", container_limits.get("memory"))
command_builder.add_flag("--no-cache", nocache)
command_builder.add_arg("--progress", self._progress)

View File

@ -1,9 +1,10 @@
backports.shutil_get_terminal_size==1.0.0
backports.ssl-match-hostname==3.5.0.1; python_version < '3'
cached-property==1.5.1
certifi==2019.11.28
certifi==2020.4.5.1
chardet==3.0.4
colorama==0.4.3; sys_platform == 'win32'
distro==1.5.0
docker==4.2.0
docker-pycreds==0.4.0
dockerpty==0.4.1
@ -17,7 +18,7 @@ paramiko==2.7.1
pypiwin32==219; sys_platform == 'win32' and python_version < '3.6'
pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6'
PySocks==1.7.1
python-dotenv==0.11.0
python-dotenv==0.13.0
PyYAML==5.3
requests==2.22.0
six==1.12.0

View File

@ -13,13 +13,13 @@ if ! [ ${DEPLOYMENT_TARGET} == "$(macos_version)" ]; then
SDK_SHA1=dd228a335194e3392f1904ce49aff1b1da26ca62
fi
OPENSSL_VERSION=1.1.1d
OPENSSL_VERSION=1.1.1g
OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
OPENSSL_SHA1=056057782325134b76d1931c48f2c7e6595d7ef4
OPENSSL_SHA1=b213a293f2127ec3e323fb3cfc0c9807664fd997
PYTHON_VERSION=3.7.6
PYTHON_VERSION=3.7.7
PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
PYTHON_SHA1=4642680fbf9a9a5382597dc0e9faa058fdfd94e2
PYTHON_SHA1=8e9968663a214aea29659ba9dfa959e8a7d82b39
#
# Install prerequisites.

View File

@ -36,10 +36,12 @@ install_requires = [
'requests >= 2.20.0, < 3',
'texttable >= 0.9.0, < 2',
'websocket-client >= 0.32.0, < 1',
'distro >= 1.5.0, < 2',
'docker[ssh] >= 3.7.0, < 5',
'dockerpty >= 0.4.1, < 1',
'six >= 1.3.0, < 2',
'jsonschema >= 2.5.1, < 4',
'python-dotenv >= 0.13.0, < 1',
]

View File

@ -985,6 +985,23 @@ class ServiceTest(DockerClientTestCase):
self.addCleanup(self.client.remove_image, service.image_name)
assert self.client.inspect_image('composetest_web')
def test_build_cli_with_build_labels(self):
base_dir = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, base_dir)
with open(os.path.join(base_dir, 'Dockerfile'), 'w') as f:
f.write("FROM busybox\n")
service = self.create_service('web',
build={
'context': base_dir,
'labels': {'com.docker.compose.test': 'true'}},
)
service.build(cli=True)
self.addCleanup(self.client.remove_image, service.image_name)
image = self.client.inspect_image('composetest_web')
assert image['Config']['Labels']['com.docker.compose.test']
def test_up_build_cli(self):
base_dir = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, base_dir)