Skip to content

Instantly share code, notes, and snippets.

@hamdouni
Created October 9, 2018 10:34
Show Gist options
  • Save hamdouni/3ac804b8bea186183b6e34317a5a5bd7 to your computer and use it in GitHub Desktop.
Save hamdouni/3ac804b8bea186183b6e34317a5a5bd7 to your computer and use it in GitHub Desktop.
How to use strace inside a docker container

Dockerfile

FROM debian:stretch-slim
RUN apt update
RUN apt install strace

docker-compose.yml

version: '3'
services:
  app:
    build: .
    cap_add:
      - SYS_PTRACE
    command: "strace df /"

use it

docker-compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment