{"id":16540814,"url":"https://github.com/itzg/easy-add","last_synced_at":"2025-08-17T22:15:26.778Z","repository":{"id":39886972,"uuid":"205069275","full_name":"itzg/easy-add","owner":"itzg","description":"A utility for easily adding a file from a downloaded archive during Docker builds","archived":false,"fork":false,"pushed_at":"2025-06-17T11:33:28.000Z","size":47,"stargazers_count":31,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-17T12:35:37.423Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itzg.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,"zenodo":null}},"created_at":"2019-08-29T03:04:09.000Z","updated_at":"2025-06-17T11:31:24.000Z","dependencies_parsed_at":"2022-09-12T00:11:44.839Z","dependency_job_id":"bb754683-1b8f-4e8b-95de-c65516fa9ec3","html_url":"https://github.com/itzg/easy-add","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/itzg/easy-add","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Feasy-add","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Feasy-add/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Feasy-add/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Feasy-add/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itzg","download_url":"https://codeload.github.com/itzg/easy-add/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itzg%2Feasy-add/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270914537,"owners_count":24667161,"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-08-17T02:00:09.016Z","response_time":129,"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-10-11T18:53:22.615Z","updated_at":"2025-08-17T22:15:26.730Z","avatar_url":"https://github.com/itzg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/itzg/easy-add)](https://github.com/itzg/easy-add/releases/latest)\n[![test](https://github.com/itzg/easy-add/actions/workflows/test.yaml/badge.svg)](https://github.com/itzg/easy-add/actions/workflows/test.yaml)\n\nA utility for easily adding a file from a downloaded archive during Docker builds\n\n## Usage\n\nRunning the binary with `--help` can be used to obtain usage at any time.\n\n```\n  -file path\n    \tThe path to executable to extract within archive\n  -from URL\n    \tURL of a tar.gz archive to download. May contain Go template references to 'var' entries.\n  -mkdirs\n    \tAttempt to create the directory path specified by to\n  -to path\n    \tThe path where executable will be placed (default \"/usr/local/bin\")\n  -var name=value\n    \tSets variables that can be referenced in 'from'. Format is name=value (default os=linux,arch=amd64)\n  -version\n    \tShow version and exit\n```\n\n## Template variables in `from`\n\nThe `from` argument is process as a Go template with `var` as the context. For example, repetition in the URL can be simplified such as:\n\n```\n--var version=1.2.0 \\\n--from https://github.com/itzg/restify/releases/download/{{.version}}/restify_{{.version}}_{{.os}}_{{.arch}}.tar.gz\n```\n\n## Example usage within `Dockerfile`\n\n```\nFROM ubuntu\n\nARG EASY_ADD_VER=0.5.3\nADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${EASY_ADD_VER}_linux_amd64 /usr/bin/easy-add\nRUN chmod +x /usr/bin/easy-add\n\nRUN easy-add --var version=1.2.0 --var app=restify --file restify --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_linux_amd64.tar.gz\n```\n\n## `Dockerfile` usage with BuildKit and multi-arch builds\n\n```\n# hook into docker BuildKit --platform support\n# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope\nARG TARGETOS=linux\nARG TARGETARCH=amd64\nARG TARGETVARIANT=\"\"\n\nARG EASY_ADD_VER=0.5.3\nADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add\nRUN chmod +x /usr/bin/easy-add\n```\n\n## Alternative when adding only a single archived-binary\n\neasy-add is somewhat overkill adding only a single archived-binary to a Docker image. The following is an alternative solution that doesn't require curl to be installed in the image:\n\n```\nADD https://github.com/itzg/rcon-cli/releases/download/1.4.7/rcon-cli_1.4.7_linux_amd64.tar.gz /tmp/rcon-cli.tgz\nRUN tar -xf /tmp/rcon-cli.tgz -C /usr/local/bin rcon-cli \u0026\u0026 rm /tmp/rcon-cli.tgz\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzg%2Feasy-add","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitzg%2Feasy-add","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzg%2Feasy-add/lists"}