Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Add labels to docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Apr 18, 2017
1 parent 0525c03 commit 9dcb4f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion badwolf/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ def run_in_container(self, docker_image_name):
volumes=volumes,
privileged=self.spec.privileged,
stdin_open=False,
tty=True
tty=True,
labels={
'repo': self.context.repository,
'commit': self.commit_hash,
'task_id': self.context.task_id,
}
)
container_id = container.id
logger.info('Created container %s from image %s', container_id, docker_image_name)
Expand Down

0 comments on commit 9dcb4f3

Please sign in to comment.