Skip to content

Commit 0e21ae6

Browse files
DOCS-8949 revised dd-lib-{js,dotnet}-init refs (DataDog#25150)
* revised dd-lib-{js,dotnet}-init refs revised references to files inside the dd-lib-{js,dotnet}-init container images. * Apply suggestions from code review Co-authored-by: Heston Hoffman <heston.hoffman@datadoghq.com> --------- Co-authored-by: Heston Hoffman <heston.hoffman@datadoghq.com>
1 parent 115b99b commit 0e21ae6

File tree

1 file changed

+25
-8
lines changed
  • content/en/security/application_security/serverless

1 file changed

+25
-8
lines changed

content/en/security/application_security/serverless/_index.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ Add the following instructions and arguments to your Dockerfile.
358358

359359
```dockerfile
360360
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
361-
COPY --from=datadog/dd-lib-js-init /operator-build/node_modules /dd_tracer/node/
361+
RUN npm install --prefix /dd_tracer/node dd-trace --save
362362
ENV DD_SERVICE=datadog-demo-run-nodejs
363363
ENV DD_ENV=datadog-demo
364364
ENV DD_VERSION=1
@@ -378,7 +378,7 @@ CMD ["/nodejs/bin/node", "/path/to/your/app.js"]
378378
2. Copy the Datadog Node.JS tracer into your Docker image.
379379

380380
```dockerfile
381-
COPY --from=datadog/dd-lib-js-init /operator-build/node_modules /dd_tracer/node/
381+
RUN npm install --prefix /dd_tracer/node dd-trace --save
382382
```
383383

384384
If you install the Datadog tracer library directly in your application, as outlined in the [manual tracer instrumentation instructions][1], omit this step.
@@ -408,7 +408,7 @@ If you already have an entrypoint defined inside your Dockerfile, you can instea
408408

409409
{{< highlight dockerfile "hl_lines=7" >}}
410410
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
411-
COPY --from=datadog/dd-lib-js-init /operator-build/node_modules /dd_tracer/node/
411+
RUN npm install --prefix /dd_tracer/node dd-trace --save
412412
ENV DD_SERVICE=datadog-demo-run-nodejs
413413
ENV DD_ENV=datadog-demo
414414
ENV DD_VERSION=1
@@ -420,7 +420,7 @@ If you require your entrypoint to be instrumented as well, you can swap your ent
420420

421421
{{< highlight dockerfile "hl_lines=7-8" >}}
422422
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
423-
COPY --from=datadog/dd-lib-js-init /operator-build/node_modules /dd_tracer/node/
423+
RUN npm install --prefix /dd_tracer/node dd-trace --save
424424
ENV DD_SERVICE=datadog-demo-run-nodejs
425425
ENV DD_ENV=datadog-demo
426426
ENV DD_VERSION=1
@@ -661,7 +661,11 @@ Add the following instructions and arguments to your Dockerfile.
661661

662662
```dockerfile
663663
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
664-
COPY --from=datadog/dd-lib-dotnet-init /datadog-init/monitoring-home/ /dd_tracer/dotnet/
664+
# For arm64 use datadog-dotnet-apm-2.57.0.arm64.tar.gz
665+
# For alpine use datadog-dotnet-apm-2.57.0-musl.tar.gz
666+
ARG TRACER_VERSION
667+
ADD https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm-${TRACER_VERSION}.tar.gz /tmp/datadog-dotnet-apm.tar.gz
668+
RUN mkdir -p /dd_tracer/dotnet/ && tar -xzvf /tmp/datadog-dotnet-apm.tar.gz -C /dd_tracer/dotnet/ && rm /tmp/datadog-dotnet-apm.tar.gz
665669
ENV DD_SERVICE=datadog-demo-run-dotnet
666670
ENV DD_ENV=datadog-demo
667671
ENV DD_VERSION=1
@@ -679,7 +683,12 @@ CMD ["dotnet", "helloworld.dll"]
679683

680684
2. Copy the Datadog .NET tracer into your Docker image.
681685
```dockerfile
682-
COPY --from=datadog/dd-lib-dotnet-init /datadog-init/monitoring-home/ /dd_tracer/dotnet/
686+
# For arm64 use datadog-dotnet-apm-2.57.0.arm64.tar.gz
687+
# For alpine use datadog-dotnet-apm-2.57.0-musl.tar.gz
688+
ARG TRACER_VERSION
689+
ADD https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm-${TRACER_VERSION}.tar.gz /tmp/datadog-dotnet-apm.tar.gz
690+
691+
RUN mkdir -p /dd_tracer/dotnet/ && tar -xzvf /tmp/datadog-dotnet-apm.tar.gz -C /dd_tracer/dotnet/ && rm /tmp/datadog-dotnet-apm.tar.gz
683692
```
684693
If you install the Datadog tracer library directly in your application, as outlined in the [manual tracer instrumentation instructions][1], omit this step.
685694

@@ -706,7 +715,11 @@ If you already have an entrypoint defined inside your Dockerfile, you can instea
706715

707716
{{< highlight dockerfile "hl_lines=7" >}}
708717
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
709-
COPY --from=datadog/dd-lib-dotnet-init /datadog-init/monitoring-home/ /dd_tracer/dotnet/
718+
# For arm64 use datadog-dotnet-apm-2.57.0.arm64.tar.gz
719+
# For alpine use datadog-dotnet-apm-2.57.0-musl.tar.gz
720+
ARG TRACER_VERSION
721+
ADD https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm-${TRACER_VERSION}.tar.gz /tmp/datadog-dotnet-apm.tar.gz
722+
RUN mkdir -p /dd_tracer/dotnet/ && tar -xzvf /tmp/datadog-dotnet-apm.tar.gz -C /dd_tracer/dotnet/ && rm /tmp/datadog-dotnet-apm.tar.gz
710723
ENV DD_SERVICE=datadog-demo-run-dotnet
711724
ENV DD_ENV=datadog-demo
712725
ENV DD_VERSION=1
@@ -718,7 +731,11 @@ If you require your entrypoint to be instrumented as well, you can swap your ent
718731

719732
{{< highlight dockerfile "hl_lines=7-8" >}}
720733
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
721-
COPY --from=datadog/dd-lib-dotnet-init /datadog-init/monitoring-home/ /dd_tracer/dotnet/
734+
# For arm64 use datadog-dotnet-apm-2.57.0.arm64.tar.gz
735+
# For alpine use datadog-dotnet-apm-2.57.0-musl.tar.gz
736+
ARG TRACER_VERSION
737+
ADD https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm-${TRACER_VERSION}.tar.gz /tmp/datadog-dotnet-apm.tar.gz
738+
RUN mkdir -p /dd_tracer/dotnet/ && tar -xzvf /tmp/datadog-dotnet-apm.tar.gz -C /dd_tracer/dotnet/ && rm /tmp/datadog-dotnet-apm.tar.gz
722739
ENV DD_SERVICE=datadog-demo-run-dotnet
723740
ENV DD_ENV=datadog-demo
724741
ENV DD_VERSION=1

0 commit comments

Comments
 (0)