From 6979a337e072d6313c46af05f40c0fa0069794db Mon Sep 17 00:00:00 2001 From: aiordache Date: Thu, 10 Sep 2020 12:11:02 +0200 Subject: [PATCH] Set service scale to 1 for oneoff containers Signed-off-by: aiordache --- compose/cli/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/cli/main.py b/compose/cli/main.py index 7ec09bea2..d01bf86a4 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -1304,6 +1304,7 @@ def run_one_off_container(container_options, project, service, options, toplevel native_builder = toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD') detach = options.get('--detach') use_network_aliases = options.get('--use-aliases') + service.scale_num = 1 containers = project.up( service_names=[service.name], start_deps=not options['--no-deps'],