Skip to content

Commit 9502188

Browse files
committed
Docker compose: use '--service-ports'
"docker compose run" does not create any of the ports specified in the service configuration by default. This is the problem for us, because user will need to specify "-p 8000:8000" or similar in docker run options, what is inconvinient.
1 parent 1b6039b commit 9502188

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

runo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ from typing import (
2929
Union,
3030
)
3131

32-
__version__ = "25.10.10-e879d7bf"
32+
__version__ = "25.10.10-99069d04"
3333

3434
# runo uses .toml format of config files, but parsers for this format
3535
# might be not available in old python versions (only in 3.11 tomllib
@@ -364,7 +364,7 @@ class Composition:
364364
[self.compose_base]
365365
+ self._generated_options
366366
+ self._compose_options_from_config
367-
+ ["run --build"]
367+
+ ["run --build --service-ports"]
368368
+ docker_run_options
369369
+ [self._cfg["docker_compose_service"]]
370370
+ [command_to_run]

tests/unit/test_runo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ def expected_calls(self, command: dict, run_options: List[str], env_specific_dat
12331233
"docker",
12341234
"compose",
12351235
*expected_docker_compose_options,
1236-
"run --build",
1236+
"run --build --service-ports",
12371237
]
12381238
+ _expected_docker_run_options(docker_run_options_str)
12391239
+ [container_config["docker_compose_service"]]

0 commit comments

Comments
 (0)