Browse Source

Set service scale to 1 for oneoff containers

Signed-off-by: aiordache <[email protected]>
aiordache 5 năm trước cách đây
mục cha
commit
6979a337e0
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      compose/cli/main.py

+ 1 - 0
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'],