Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/testcontainers/core/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def start(self) -> Self:
Reaper.get_instance()
logger.info("Pulling image %s", self.image)
docker_client = self.get_docker_client()
self._configure()
self._container = docker_client.run(
self.image,
command=self._command,
Expand Down Expand Up @@ -176,6 +177,10 @@ def exec(self, command) -> tuple[int, str]:
raise ContainerStartException("Container should be started before executing a command")
return self._container.exec_run(command)

def _configure(self) -> None:
# placeholder if subclasses want to define this and use the default start method
pass


class Reaper:
_instance: "Optional[Reaper]" = None
Expand Down