{"id":13707148,"url":"https://github.com/orisano/targd","last_synced_at":"2025-05-07T17:14:01.243Z","repository":{"id":68082263,"uuid":"143307649","full_name":"orisano/targd","owner":"orisano","description":" targd is multistage build helper","archived":false,"fork":false,"pushed_at":"2024-04-18T21:53:11.000Z","size":1179,"stargazers_count":25,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T17:13:53.826Z","etag":null,"topics":["cli","docker","docker-build","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orisano.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":"2018-08-02T14:44:34.000Z","updated_at":"2023-04-13T00:14:18.000Z","dependencies_parsed_at":"2024-04-02T12:51:33.303Z","dependency_job_id":"773dc6c7-74ef-4846-86f4-4a821cccd568","html_url":"https://github.com/orisano/targd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Ftargd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Ftargd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Ftargd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orisano%2Ftargd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orisano","download_url":"https://codeload.github.com/orisano/targd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922335,"owners_count":21825639,"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":["cli","docker","docker-build","golang"],"created_at":"2024-08-02T22:01:21.777Z","updated_at":"2025-05-07T17:14:01.227Z","avatar_url":"https://github.com/orisano.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# targd\ntargd is multistage build helper. targd outputs dependent stage of the specified target stage. (includes target stage)\n\n## Installation\n```bash\ngo get github.com/orisano/targd\n```\n\n## How to use\n```bash\n$ targd\n  -f string\n    \tDockerfile path (default \"Dockerfile\")\n  -o string\n    \tgenerated Dockerfile path (default \"-\")\n  -target string\n    \ttarget stage name (required)\n```\n```bash\n$ targd -target test | docker build -f - .\n```\nor\n```bash\n$ docker run -v $(PWD):/host orisano/targd -f /host/Dockerfile -target production\n```\n\n## Example\n```dockerfile\n# ./Dockerfile\nFROM alpine:3.8 as builder\nCOPY ./depfile ./lockfile ./\nRUN install_cmd\nCOPY . .\nRUN build_cmd\n\nFROM builder as test\nRUN test_cmd\n\nFROM alpine:3.8 as runtime\nCOPY --from=builder /bin/app /bin/app\nENTRYPOINT [\"/bin/app\"]\nCMD [\"--help\"]\n```\n```bash\n$ targd -target test\nFROM alpine:3.8 as builder\nCOPY ./depfile ./lockfile ./\nRUN install_cmd\nCOPY . .\nRUN build_cmd\n\nFROM builder as test\nRUN test_cmd\n\n```\n```bash\n$ targd -target runtime\nFROM alpine:3.8 as builder\nCOPY ./depfile ./lockfile ./\nRUN install_cmd\nCOPY . .\nRUN build_cmd\n\nFROM alpine:3.8 as runtime\nCOPY --from=builder /bin/app /bin/app\nENTRYPOINT [\"/bin/app\"]\nCMD [\"--help\"]\n\n```\n\n## Author\nNao Yonashiro (@orisano)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forisano%2Ftargd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forisano%2Ftargd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forisano%2Ftargd/lists"}