Batch: explicitly specify json-file log driver
This is necessary when the Docker daemon on the host is configured to use a different log driver by default.
This commit is contained in:
parent
4d5bf1c5c6
commit
c904c906f6
@ -384,8 +384,9 @@ class Job(threading.Thread, BaseModel):
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
self.job_state = "STARTING"
|
self.job_state = "STARTING"
|
||||||
|
log_config = docker.types.LogConfig(type=docker.types.LogConfig.types.JSON)
|
||||||
container = self.docker_client.containers.run(
|
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_state = "RUNNING"
|
||||||
self.job_started_at = datetime.datetime.now()
|
self.job_started_at = datetime.datetime.now()
|
||||||
|
Loading…
Reference in New Issue
Block a user