diff --git a/compose/cli/main.py b/compose/cli/main.py index 53c9c42bc..494e85620 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -1482,7 +1482,7 @@ def log_printer_from_project( keep_prefix=True, ): return LogPrinter( - containers, + [c for c in containers if c.log_driver not in (None, 'none')], build_log_presenters(project.service_names, monochrome, keep_prefix), event_stream or project.events(), cascade_stop=cascade_stop, diff --git a/compose/project.py b/compose/project.py index 0f112c9c1..e862464d8 100644 --- a/compose/project.py +++ b/compose/project.py @@ -490,8 +490,6 @@ class Project: log.info('%s uses an image, skipping' % service.name) if cli: - log.info("Building with native build. Learn about native build in Compose here: " - "https://docs.docker.com/go/compose-native-build/") if parallel_build: log.warning("Flag '--parallel' is ignored when building with " "COMPOSE_DOCKER_CLI_BUILD=1") @@ -651,10 +649,6 @@ class Project: override_options=None, ): - if cli: - log.info("Building with native build. Learn about native build in Compose here: " - "https://docs.docker.com/go/compose-native-build/") - self.initialize() if not ignore_orphans: self.find_orphan_containers(remove_orphans) diff --git a/compose/service.py b/compose/service.py index df0d76fb9..3829e8269 100644 --- a/compose/service.py +++ b/compose/service.py @@ -1873,6 +1873,13 @@ class _CLIBuilder: command_builder.add_arg("--tag", tag) command_builder.add_arg("--target", target) command_builder.add_arg("--iidfile", iidfile) + command_builder.add_arg("--platform", platform) + command_builder.add_arg("--isolation", isolation) + + if extra_hosts: + for host, ip in extra_hosts.items(): + command_builder.add_arg("--add-host", "{}:{}".format(host, ip)) + args = command_builder.build([path]) magic_word = "Successfully built " diff --git a/requirements.txt b/requirements.txt index fd3705041..a7f0e0279 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ certifi==2020.6.20 chardet==3.0.4 colorama==0.4.3; sys_platform == 'win32' distro==1.5.0 -docker==4.4.3 +docker==4.4.4 docker-pycreds==0.4.0 dockerpty==0.4.1 docopt==0.6.2 diff --git a/setup.py b/setup.py index 74012bf14..c58a1acc4 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ install_requires = [ 'texttable >= 0.9.0, < 2', 'websocket-client >= 0.32.0, < 1', 'distro >= 1.5.0, < 2', - 'docker[ssh] >= 4.4.3, < 5', + 'docker[ssh] >= 4.4.4, < 5', 'dockerpty >= 0.4.1, < 1', 'jsonschema >= 2.5.1, < 4', 'python-dotenv >= 0.13.0, < 1',