Set service scale to 1 for oneoff containers

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2020-09-10 12:11:02 +02:00 committed by Ulysses Souza
parent 9f47d4e5d7
commit 6979a337e0
1 changed files with 1 additions and 0 deletions

View File

@ -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'],