From 1b9855c1c2dbbee6f5708de15d0b268b569aeba1 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Fri, 13 Mar 2020 11:57:44 +0100 Subject: [PATCH 01/10] Fix pip install by adding python-dotenv to setup.py Signed-off-by: Ulysses Souza --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 548e2bc93..bca578e11 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ install_requires = [ 'dockerpty >= 0.4.1, < 1', 'six >= 1.3.0, < 2', 'jsonschema >= 2.5.1, < 4', + 'python-dotenv >= 0.10.5, < 1', ] From 1a688289b42c6927c3e05304c5259db1f85c69c4 Mon Sep 17 00:00:00 2001 From: luHub Date: Sat, 28 Mar 2020 17:50:23 +0100 Subject: [PATCH 02/10] add labels to CLIbuilder Signed-off-by: luHub --- compose/service.py | 1 + tests/integration/service_test.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/compose/service.py b/compose/service.py index ebe237b8c..92b2b3329 100644 --- a/compose/service.py +++ b/compose/service.py @@ -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) diff --git a/tests/integration/service_test.py b/tests/integration/service_test.py index c50aab08b..01e2e1d22 100644 --- a/tests/integration/service_test.py +++ b/tests/integration/service_test.py @@ -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) From 23889a8f88f364a2777493e9295919c9d71b7edf Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Thu, 9 Apr 2020 14:22:37 +0200 Subject: [PATCH 03/10] Bump OPENSSL to 1.1.1f Signed-off-by: Ulysses Souza --- script/setup/osx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/setup/osx b/script/setup/osx index 00cca06cf..00ae929b9 100755 --- a/script/setup/osx +++ b/script/setup/osx @@ -13,9 +13,9 @@ if ! [ ${DEPLOYMENT_TARGET} == "$(macos_version)" ]; then SDK_SHA1=dd228a335194e3392f1904ce49aff1b1da26ca62 fi -OPENSSL_VERSION=1.1.1d +OPENSSL_VERSION=1.1.1f OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -OPENSSL_SHA1=056057782325134b76d1931c48f2c7e6595d7ef4 +OPENSSL_SHA1=238e001ea1fbf19ede43e36209c37c1a636bb51f PYTHON_VERSION=3.7.6 PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz From 27d43ed041f49c4cd68ac28a7a9e2229e929bb67 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Thu, 16 Apr 2020 10:09:21 +0200 Subject: [PATCH 04/10] Update changelog to 1.25.5 Signed-off-by: Ulysses Souza --- CHANGELOG.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8cd889f0..78f512272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) ------------------- From a62a1e1d6273d1b2021b072603ee9ffc86afc5c5 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Thu, 16 Apr 2020 17:04:40 +0200 Subject: [PATCH 05/10] Add "distro" package This package implements the method 'platform.linux_distribution' removed in Python 3.8 Signed-off-by: Ulysses Souza --- compose/cli/utils.py | 3 ++- requirements.txt | 1 + setup.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compose/cli/utils.py b/compose/cli/utils.py index 931487a6c..40bef1652 100644 --- a/compose/cli/utils.py +++ b/compose/cli/utils.py @@ -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(): diff --git a/requirements.txt b/requirements.txt index b1bc69442..71b07540e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ cached-property==1.5.1 certifi==2019.11.28 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 diff --git a/setup.py b/setup.py index bca578e11..cf273ed54 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ 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', From b7d6dc79410a8aaa2fec06f8461627df8da147d4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2020 15:48:12 +0000 Subject: [PATCH 06/10] Bump certifi from 2019.11.28 to 2020.4.5.1 Bumps [certifi](https://github.com/certifi/python-certifi) from 2019.11.28 to 2020.4.5.1. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](https://github.com/certifi/python-certifi/commits) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 71b07540e..933bcf8d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ 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 From ce782b592fb20ef1d18e7e30d94680dbb4883ff8 Mon Sep 17 00:00:00 2001 From: Joe Hattori Date: Sun, 19 Apr 2020 01:52:19 +0900 Subject: [PATCH 07/10] Simplify code in compose/config/config.py Signed-off-by: Joe Hattori --- compose/config/config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compose/config/config.py b/compose/config/config.py index a5f7e35aa..444a40325 100644 --- a/compose/config/config.py +++ b/compose/config/config.py @@ -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) From d52b51e8eac6546b803e2ab3a3a9645417185657 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Mon, 20 Apr 2020 18:31:52 +0200 Subject: [PATCH 08/10] Bump python-dotenv from 0.11.0 to 0.13.0 Signed-off-by: Ulysses Souza --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 933bcf8d4..1f78d378b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,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 diff --git a/setup.py b/setup.py index cf273ed54..efc144b7f 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ install_requires = [ 'dockerpty >= 0.4.1, < 1', 'six >= 1.3.0, < 2', 'jsonschema >= 2.5.1, < 4', - 'python-dotenv >= 0.10.5, < 1', + 'python-dotenv >= 0.13.0, < 1', ] From d64f3f39122fce334dba8ec33daae7e889dae7cb Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Tue, 21 Apr 2020 11:04:10 +0200 Subject: [PATCH 09/10] Remove unused files Signed-off-by: Ulysses Souza --- .fossa.yml | 14 -------------- Dockerfile.s390x | 15 --------------- 2 files changed, 29 deletions(-) delete mode 100644 .fossa.yml delete mode 100644 Dockerfile.s390x diff --git a/.fossa.yml b/.fossa.yml deleted file mode 100644 index b50761ef1..000000000 --- a/.fossa.yml +++ /dev/null @@ -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: . diff --git a/Dockerfile.s390x b/Dockerfile.s390x deleted file mode 100644 index 9bae72d67..000000000 --- a/Dockerfile.s390x +++ /dev/null @@ -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"] From 836e2b7c4dd9c65b7e829104d116ee2050021343 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Tue, 21 Apr 2020 10:45:40 +0200 Subject: [PATCH 10/10] General bumps Signed-off-by: Ulysses Souza --- Dockerfile | 8 ++++---- Jenkinsfile | 2 +- README.md | 2 +- Release.Jenkinsfile | 2 +- script/run/run.sh | 2 +- script/setup/osx | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 918c6876b..1f7608e24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 5dd1101c2..127a26c7f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ #!groovy -def dockerVersions = ['19.03.5'] +def dockerVersions = ['19.03.8'] def baseImages = ['alpine', 'debian'] def pythonVersions = ['py37'] diff --git a/README.md b/README.md index 27c8dcb34..18f7e1bc1 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/Release.Jenkinsfile b/Release.Jenkinsfile index 953e19e4d..8aa741e56 100644 --- a/Release.Jenkinsfile +++ b/Release.Jenkinsfile @@ -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'] diff --git a/script/run/run.sh b/script/run/run.sh index 7df5fe979..cd566f334 100755 --- a/script/run/run.sh +++ b/script/run/run.sh @@ -15,7 +15,7 @@ set -e -VERSION="1.25.1" +VERSION="1.25.5" IMAGE="docker/compose:$VERSION" diff --git a/script/setup/osx b/script/setup/osx index 00ae929b9..678b7f22a 100755 --- a/script/setup/osx +++ b/script/setup/osx @@ -13,13 +13,13 @@ if ! [ ${DEPLOYMENT_TARGET} == "$(macos_version)" ]; then SDK_SHA1=dd228a335194e3392f1904ce49aff1b1da26ca62 fi -OPENSSL_VERSION=1.1.1f +OPENSSL_VERSION=1.1.1g OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -OPENSSL_SHA1=238e001ea1fbf19ede43e36209c37c1a636bb51f +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.