Skip to content

Commit 830a4b0

Browse files
committed
Use alpine base for lib-injection image
`libdl.so.2: cannot open shared object file: No such file or directory` errors have been reported in customer environments which prevents application containers from starting up when using [library injection](https://docs.datadoghq.com/tracing/trace_collection/library_injection_local/?tab=kubernetes#step-3---tag-your-pods-with-unified-service-tags). Likely this is due to some other software such as instrumentation or security that modifies the command run in the container. `busybox` [lacks many standard C libraries](docker-library/busybox#46). `alpine` is a similarly sized image which does provide the standard C libraries which mitigates the issue There is little risk in changing the base image to `alpine` as the only command required is to copy files from the image to a volume. It is possible that the command that is being added to the container is not compatible with alpine images. Change the base image from `busybox` to `alpine` to make the image more compatible with other software environments.
1 parent 06d60cb commit 830a4b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: .github/workflows/lib-injection.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Docker platforms
3434
id: buildx-platforms
3535
run: |
36-
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw busybox:latest | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
36+
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw alpine:3.18.3 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
3737
echo "$BUILDX_PLATFORMS"
3838
echo "platforms=$BUILDX_PLATFORMS" >> $GITHUB_OUTPUT
3939

Diff for: lib-injection/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM scratch AS java_agent
22
COPY dd-java-agent.jar /
33

4-
FROM busybox
4+
FROM alpine:3.18.3
55

66
ARG UID=10000
77
RUN addgroup -g 10000 -S datadog \

0 commit comments

Comments
 (0)