appview icon indicating copy to clipboard operation
appview copied to clipboard

Scope using LD_PRELOAD fails for redis glibc container

Open seanvaleo opened this issue 2 years ago • 0 comments

Steps To Reproduce

Scoping following container fails Dockerfile.redis:

FROM redis:6

COPY --from=cribl/scope:1.3.2 /usr/local/bin/scope /usr/local/bin/scope
RUN /usr/local/bin/scope extract /usr/local/lib/

ENV LD_PRELOAD="/usr/local/lib/libscope.so"

# Expose Redis port
EXPOSE 6379

# Start Redis server
CMD ["redis-server"]
docker build --file Dockerfile.redis --tag myredis:latest .
docker run myredis:latest

There is no libscope.so in the redis process above

Scoping same container using different image works fine:

Dockerfile.alpine:

FROM redis:6-alpine

COPY --from=cribl/scope:1.3.2 /usr/local/bin/scope /usr/local/bin/scope
RUN /usr/local/bin/scope extract /usr/local/lib/

ENV LD_PRELOAD="/usr/local/lib/libscope.so"

# Expose Redis port
EXPOSE 6379

# Start Redis server
CMD ["redis-server"]
docker build --file Dockerfile.alpine --tag myredisalpine:latest .
docker run myredisalpine

Environment

- AppScope: 1.3.1
- OS: Ubuntu
- Architecture: x86_64
- Kernel: 5.19

seanvaleo avatar Oct 09 '23 01:10 seanvaleo