Skip to content

Commit 76f7e22

Browse files
committed
try node built-in cache instead
1 parent eb2bd8b commit 76f7e22

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,9 @@ RUN find /nodejs/node_modules -name "*.md" -delete
6464
# Warm up v8 compile cache
6565
RUN node -e "require('/nodejs/node_modules/datadog-lambda-js/runtime/module_importer').initTracer()"
6666

67+
# Remove leftover temp files
68+
RUN rm -rf /tmp/yarn-*
69+
6770
FROM scratch
68-
COPY --from=builder /nodejs /
71+
COPY --from=builder /nodejs /nodejs
72+
COPY --from=builder /tmp /tmp

scripts/build_layers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function docker_build_zip {
3838
# between different node runtimes.
3939
temp_dir=$(mktemp -d)
4040
docker buildx build -t datadog-lambda-layer-node:$1 . --no-cache \
41-
--build-arg image=registry.ddbuild.io/images/mirror/node:${node_image_version}-bullseye --progress=plain -o $temp_dir/nodejs
41+
--build-arg image=registry.ddbuild.io/images/mirror/node:${node_image_version}-bullseye --progress=plain -o $temp_dir
4242

4343
# Zip to destination, and keep directory structure as based in $temp_dir
4444
(cd $temp_dir && zip -q -r $destination ./)

src/runtime/module_importer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports.import = function (path) {
2727
}
2828

2929
exports.initTracer = function () {
30-
compileCache()
30+
// compileCache()
3131

3232
// Looks for the function local version of dd-trace first, before using
3333
// the version provided by the layer

0 commit comments

Comments
 (0)