test: add entrypoint to containers.run

This commit is contained in:
Roman 2024-12-20 18:47:54 +08:00
parent 09c8e64ff4
commit cc9a158784
No known key found for this signature in database
GPG Key ID: B8FE070B54E11B75
2 changed files with 9 additions and 2 deletions

View File

@ -50,7 +50,14 @@ class DockerManager:
cli_args_str_for_log = " ".join(cli_args) cli_args_str_for_log = " ".join(cli_args)
logger.debug(f"docker run -i -t {port_bindings} {image_name} {cli_args_str_for_log}") logger.debug(f"docker run -i -t {port_bindings} {image_name} {cli_args_str_for_log}")
container = self._client.containers.run( container = self._client.containers.run(
image_name, command=cli_args, ports=port_bindings, detach=True, remove=remove_container, auto_remove=remove_container, volumes=volumes image_name,
command=cli_args,
ports=port_bindings,
detach=True,
remove=remove_container,
auto_remove=remove_container,
volumes=volumes,
entrypoint=entrypoint,
) )
network = self._client.networks.get(NETWORK_NAME) network = self._client.networks.get(NETWORK_NAME)

View File

@ -74,5 +74,5 @@ class NomosNode:
entrypoint=self._entrypoint, entrypoint=self._entrypoint,
remove_container=True, remove_container=True,
) )
logger.debug(f"Container returned {self._container}")
logger.debug(f"Started container from image {self._image_name}") logger.debug(f"Started container from image {self._image_name}")