{"id":22861824,"url":"https://github.com/escapace/dockerfile-tools","last_synced_at":"2025-06-23T00:06:59.615Z","repository":{"id":266624454,"uuid":"898873259","full_name":"escapace/dockerfile-tools","owner":"escapace","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-26T07:58:26.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"trunk","last_synced_at":"2025-06-09T11:04:08.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/escapace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-12-05T07:43:32.000Z","updated_at":"2025-04-26T07:58:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"b995fb74-31dd-4f90-84d9-8b13a1819720","html_url":"https://github.com/escapace/dockerfile-tools","commit_stats":null,"previous_names":["escapace/dockerfile-tools"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/escapace/dockerfile-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escapace%2Fdockerfile-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escapace%2Fdockerfile-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escapace%2Fdockerfile-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escapace%2Fdockerfile-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escapace","download_url":"https://codeload.github.com/escapace/dockerfile-tools/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escapace%2Fdockerfile-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261386809,"owners_count":23150873,"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","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-13T10:11:09.772Z","updated_at":"2025-06-23T00:06:54.597Z","avatar_url":"https://github.com/escapace.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockerfile-tools\n\nA command-line application designed to assist with analyzing and extracting\ninformation from Dockerfiles. It provides three main functionalities: generating a\nJSON Abstract Syntax Tree (AST) from a Dockerfile, listing the build stages defined\nwithin a Dockerfile, and listing cache mounts in RUN instructions.\n\n## Usage\n\nThe application provides the following commands:\n\n### ast\n\nGenerates a JSON AST from a specified Dockerfile.\n\n#### Options\n\n- `--dockerfile string`: Path to the Dockerfile.\n- `--help`: Display help information for the `ast` command.\n\n#### Example\n\n```bash\ndockerfile-tools ast --dockerfile path/to/Dockerfile\n```\n\n### list-stages\n\nLists the build stages of a specified Dockerfile.\n\n#### Options\n\n- `--dockerfile string`: Path to the Dockerfile.\n- `--help`: Display help information for the `list-stages` command.\n\n#### Example\n\n```bash\ndockerfile-tools list-stages --dockerfile path/to/Dockerfile\n```\n\n### list-cache-mounts\n\nExtracts --mount=type=cache flags from RUN instructions in a Dockerfile and outputs a JSON object.\nThe target paths are used as the values, while the keys are derived by replacing / with spaces and\nconverting the result to kebab-case. The output is compatible with the `cache-map` option of\n[buildkit-cache-dance](https://github.com/reproducible-containers/buildkit-cache-dance), making it\neasier to define cache mappings for reproducible builds.\n\n#### Options\n\n- `--dockerfile string`: Path to the Dockerfile.\n- `--arg`: comma-delimited ARG key-value pairs\n- `--help`: Display help information for the `list-cache-mounts` command.\n\n#### Example\n\n```bash\ndockerfile-tools list-cache-mounts --dockerfile path/to/Dockerfile \\\n--arg BUILDPLATFORM=linux/amd64 --arg BUILDOS=linux,BUILDARCH=amd64\n```\n\n## Help\n\nFor general help, run the application without any arguments:\n\n```bash\ndockerfile-tools\n```\n\nThis will display a list of available commands and their descriptions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescapace%2Fdockerfile-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescapace%2Fdockerfile-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescapace%2Fdockerfile-tools/lists"}