Skip to content

Log conda version and docker image hash when creating a container. #8755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7 changes: 7 additions & 0 deletions readthedocs/doc_builder/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,11 @@ def container_id(self):
if self.container:
return self.container.get('Id')

@property
def conda_version(self):
"""Return conda version if exists."""
return self.run("conda", "--version")

def container_state(self):
"""Get container state."""
client = self.get_client()
Expand Down Expand Up @@ -794,6 +799,8 @@ def create_container(self):
'Creating Docker container.',
container_image=self.container_image,
container_id=self.container_id,
conda_version=self.conda_version,
image_hash=self.image_hash,
)
self.container = client.create_container(
image=self.container_image,
Expand Down