Merge pull request #2635 from kislyuk/patch-5

Batch: explicitly specify json-file log driver
This commit is contained in:
Mike Grima 2019-12-12 18:35:42 -08:00 committed by GitHub
commit d86852bfa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -384,8 +384,9 @@ class Job(threading.Thread, BaseModel):
time.sleep(1)
self.job_state = "STARTING"
log_config = docker.types.LogConfig(type=docker.types.LogConfig.types.JSON)
container = self.docker_client.containers.run(
image, cmd, detach=True, name=name
image, cmd, detach=True, name=name, log_config=log_config
)
self.job_state = "RUNNING"
self.job_started_at = datetime.datetime.now()