{"id":23666605,"url":"https://github.com/redsift/tracer","last_synced_at":"2025-10-12T05:50:12.974Z","repository":{"id":145311738,"uuid":"59863248","full_name":"redsift/tracer","owner":"redsift","description":null,"archived":false,"fork":false,"pushed_at":"2016-05-31T18:43:41.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-21T00:13:34.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redsift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-27T21:05:46.000Z","updated_at":"2016-05-27T21:05:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd26b6ad-ace2-4d55-b5e4-8e2bea7426c8","html_url":"https://github.com/redsift/tracer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/redsift/tracer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Ftracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Ftracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Ftracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Ftracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redsift","download_url":"https://codeload.github.com/redsift/tracer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Ftracer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010335,"owners_count":26084738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-29T07:33:13.513Z","updated_at":"2025-10-12T05:50:12.969Z","avatar_url":"https://github.com/redsift.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installation\n    \n    # Install pip if required\n    easy_install pip\n\n    pip install -r requirements.txt\n\n# Usage\n\n    # Strace the ls command and write the syscalls to ls.out\n    strace -ttt -o ls.out ls\n\n    # Run tracer to process ls.out and write a Docker file\n    # Set ENTRYPOINT to /usr/bin/ls\n    ./tracer.py -e /usr/bin/ls ls.out\n\n    # Build the image\n    cd build\n    docker build -t traced-ls .\n    \n    # Run the scratch image\n    docker run -ti traced-ls\n    \n## Advanced usage\n    \n    # Strace all commands for the current shell in the background\n    strace -ttt -o $$.out -p $$ -f \u0026\n    \n    # Run my command(s)\n    ls\n    \n    # Exit the shell\n    exit\n    \n    # \u003cpid-of-shell\u003e.out now contains the syscall trace of the shell and the child ls  \n    # Assuming the pid of the shell was 22092, make a runc rootfs of the executed ls\n    # while ignoring the parent shell process\n    \n    ./tracer.py -e /bin/ls --runc -i 22092 22092.out  \n\n# Help\n\n    usage: tracer.py [-h] [--chdir CHDIR] [--build BUILD] [--cmd CMD]\n                    [--entrypoint ENTRYPOINT] [--script SCRIPT]\n                    [--ldd | --no-ldd] [--nss | --no-nss] [--ids | --no-ids]\n                    files [files ...]\n\n    Process strace output and generate Dockerfile.\n\n    positional arguments:\n    files                 strace files to parse\n\n    optional arguments:\n    -h, --help            show this help message and exit\n    --chdir CHDIR         Initial working directory for strace file\n    --build BUILD         Directory to assemble Dockerfile in\n    --cmd CMD, -c CMD     Docker CMD\n    --entrypoint ENTRYPOINT, -e ENTRYPOINT\n                            Docker ENTRYPOINT\n    --script SCRIPT, -s SCRIPT\n                            Create a script file to assemble directory insead of\n                            doing it\n    --ldd                 Include LDD configuration\n    --no-ldd\n    --nss                 Include resolover services\n    --no-nss\n    --ids                 Include machine-id from host\n    --no-ids\n\n# OCI/runc\n\nUse the `--runc` flag to create a `config.json` that can be used in tools like runc. `--entrypoint` and `--cmd` will be used to generate the spec. This flag requires `runc` installed and in the path.\n\n# Issues\n\n- Ensure your system `strace` is up to date. \n- You typically cannot trace from inside a Docker container. \n- Ensure you use the -ttt flag to create parseable timestamps.\n- When attempting to create small distributions from Red Hat based distros, /usr/lib/locale/locale-archive can be large.\n\n# Acknowledgements\n\nIncludes a srtace parser from https://github.com/dirtyharrycallahan/pystrace and ELF parser from https://github.com/larsks/dockerize","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsift%2Ftracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredsift%2Ftracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsift%2Ftracer/lists"}