You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -474,6 +474,27 @@ Note that by default, the `docker_image` used comes from the registry `public.ec
474
474
475
475
If you override `docker_image`, be sure to keep the image in sync with your `runtime`. During the plan phase, when using docker, there is no check that the `runtime` is available to build the package. That means that if you use an image that does not have the runtime, the plan will still succeed, but then the apply will fail.
476
476
477
+
#### Passing additional Docker options
478
+
479
+
To add flexibility when building in docker, you can pass any number of additional options that you require (see [Docker run reference](https://docs.docker.com/engine/reference/run/) for available options):
To override the docker entrypoint when building in docker, set `docker_entrypoint`:
491
+
492
+
```hcl
493
+
docker_entrypoint = "/entrypoint/entrypoint.sh"
494
+
```
495
+
496
+
The entrypoint must map to a path within your container, so you need to either build your own image that contains the entrypoint or map it to a file on the host by mounting a volume (see [Passing additional Docker options](#passing-additional-docker-options)).
497
+
477
498
## <aname="package"></a> Deployment package - Create or use existing
478
499
479
500
By default, this module creates deployment package and uses it to create or update Lambda Function or Lambda Layer.
@@ -716,7 +737,9 @@ No modules.
716
737
| <aname="input_description"></a> [description](#input\_description)| Description of your Lambda Function (or Layer) |`string`|`""`| no |
717
738
| <aname="input_destination_on_failure"></a> [destination\_on\_failure](#input\_destination\_on\_failure)| Amazon Resource Name (ARN) of the destination resource for failed asynchronous invocations |`string`|`null`| no |
718
739
| <aname="input_destination_on_success"></a> [destination\_on\_success](#input\_destination\_on\_success)| Amazon Resource Name (ARN) of the destination resource for successful asynchronous invocations |`string`|`null`| no |
740
+
| <aname="input_docker_additional_options"></a> [docker\_additional\_options](#input\_docker\_additional\_options)| Additional options to pass to the docker run command (e.g. to set environment variables, volumes, etc.) |`list(string)`|`[]`| no |
719
741
| <aname="input_docker_build_root"></a> [docker\_build\_root](#input\_docker\_build\_root)| Root dir where to build in Docker |`string`|`""`| no |
742
+
| <aname="input_docker_entrypoint"></a> [docker\_entrypoint](#input\_docker\_entrypoint)| Path to the Docker entrypoint to use |`string`|`null`| no |
720
743
| <aname="input_docker_file"></a> [docker\_file](#input\_docker\_file)| Path to a Dockerfile when building in Docker |`string`|`""`| no |
721
744
| <aname="input_docker_image"></a> [docker\_image](#input\_docker\_image)| Docker image to use for the build |`string`|`""`| no |
722
745
| <aname="input_docker_pip_cache"></a> [docker\_pip\_cache](#input\_docker\_pip\_cache)| Whether to mount a shared pip cache folder into docker environment or not |`any`|`null`| no |
0 commit comments