appscope icon indicating copy to clipboard operation
appscope copied to clipboard

[Bug]: Scope using LD_PRELOAD fails for redis glibc container

Open michalbiesek opened this issue 1 year 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

Requested priority

None

Relevant log output

No response

michalbiesek avatar Apr 28 '23 10:04 michalbiesek