Merge pull request #2701 from kislyuk/patch-2
awslambda: explicitly specify json-file log driver
This commit is contained in:
commit
2f9b259cc1
@ -395,6 +395,7 @@ class LambdaFunction(BaseModel):
|
|||||||
env_vars.update(self.environment_vars)
|
env_vars.update(self.environment_vars)
|
||||||
|
|
||||||
container = output = exit_code = None
|
container = output = exit_code = None
|
||||||
|
log_config = docker.types.LogConfig(type=docker.types.LogConfig.types.JSON)
|
||||||
with _DockerDataVolumeContext(self) as data_vol:
|
with _DockerDataVolumeContext(self) as data_vol:
|
||||||
try:
|
try:
|
||||||
run_kwargs = (
|
run_kwargs = (
|
||||||
@ -410,6 +411,7 @@ class LambdaFunction(BaseModel):
|
|||||||
volumes=["{}:/var/task".format(data_vol.name)],
|
volumes=["{}:/var/task".format(data_vol.name)],
|
||||||
environment=env_vars,
|
environment=env_vars,
|
||||||
detach=True,
|
detach=True,
|
||||||
|
log_config=log_config,
|
||||||
**run_kwargs
|
**run_kwargs
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user