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
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ new RustFunction(this, 'Rust function', {
176
176
177
177
To force bundling in a docker container even if `Cargo Lambda` is available in your environment, set the `forcedDockerBundling` prop to `true`. This is useful if you want to make sure that your function is built in a consistent Lambda compatible environment.
178
178
179
-
By default, these constructs use `ghcr.io/cargo-lambda/cargo-lambda` as the image to build with. Use the `bundling.dockerImage` prop to use a custom bundling image:
179
+
By default, these constructs use [ghcr.io/cargo-lambda/cargo-lambda](https://github.com/cargo-lambda/cargo-lambda/pkgs/container/cargo-lambda) as the image to build with. Use the `bundling.dockerImage` prop to use a custom bundling image:
180
180
181
181
```ts
182
182
import { RustFunction } from'cargo-lambda-cdk';
@@ -207,6 +207,45 @@ new RustFunction(this, 'Rust function', {
207
207
208
208
This property mirrors values from the `cdk.BundlingOptions` and is passed into `Code.fromAsset`.
209
209
210
+
If you want to use a custom Docker image, you can use the `bundling.dockerImage` prop:
If you want to mount additional volumes to the Docker container, you can use the `dockerOptions.volumes` prop. This is useful if you want to mount Cargo's cache directory to speed up the build process. The `CARGO_HOME` in the default image is `/usr/local/cargo`.
0 commit comments