{"id":18941301,"url":"https://github.com/frantjc/dockerfile-addendum","last_synced_at":"2026-05-16T18:02:48.587Z","repository":{"id":62330543,"uuid":"498951789","full_name":"frantjc/dockerfile-addendum","owner":"frantjc","description":"Make Dockerfile's ADD function identically regardless of source.","archived":false,"fork":false,"pushed_at":"2024-01-17T01:00:23.000Z","size":230,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T18:21:48.393Z","etag":null,"topics":["docker","dockerfile","go","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/frantjc.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":"2022-06-02T01:30:09.000Z","updated_at":"2023-07-07T19:38:55.000Z","dependencies_parsed_at":"2024-01-17T03:28:47.464Z","dependency_job_id":null,"html_url":"https://github.com/frantjc/dockerfile-addendum","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"6c6a440a64f9b39818a9ddd4002e417a991f889d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/frantjc/dockerfile-addendum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frantjc%2Fdockerfile-addendum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frantjc%2Fdockerfile-addendum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frantjc%2Fdockerfile-addendum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frantjc%2Fdockerfile-addendum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frantjc","download_url":"https://codeload.github.com/frantjc/dockerfile-addendum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frantjc%2Fdockerfile-addendum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278245374,"owners_count":25955013,"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-03T02:00:06.070Z","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":["docker","dockerfile","go","golang"],"created_at":"2024-11-08T12:27:18.576Z","updated_at":"2025-10-03T23:46:00.722Z","avatar_url":"https://github.com/frantjc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockerfile-ADDendum [![CI](https://github.com/frantjc/dockerfile-addendum/actions/workflows/ci.yml/badge.svg?branch=main\u0026event=push)](https://github.com/frantjc/dockerfile-addendum/actions) [![godoc](https://pkg.go.dev/badge/github.com/frantjc/dockerfile-addendum.svg)](https://pkg.go.dev/github.com/frantjc/dockerfile-addendum) [![goreportcard](https://goreportcard.com/badge/github.com/frantjc/dockerfile-addendum)](https://goreportcard.com/report/github.com/frantjc/dockerfile-addendum) ![license](https://shields.io/github/license/frantjc/dockerfile-addendum)\n\nSmall script to pair with the Dockerfile `ADD` directive to make an idempotent action regardless of if the `\u003csrc\u003e` of the `ADD` is a local tar archive or a tar archive from a remote URL.\n\n## use case\n\nA Dockerfile's `ADD` directive is a bit [finicky](https://docs.docker.com/engine/reference/builder/#add). It allows files to be added to the image either from a local directory or a remote URL. This has value in that if the `\u003csrc\u003e` of the `ADD` is an `ARG`, then the functionality of the `ADD` can be changed with build-time arguments.\n\nFor example, this allows developers to lazily get the latest version of the dependency from a tar archive at some remote URL while CI consistently supplies the same tar archive to the Dockerfile as a `--build-arg`.\n\nHowever, if that `\u003csrc\u003e` is expected to be either a local tar archive or a remote tar archive, the `ADD` directive is not idempotent; `ADD` unpacks local tar archives but not remote ones. As a result, subsequent Dockerfile directives would have to account for the difference to make the build successful.\n\nThis is where the ADDendum comes in:\n\n## usage\n\n```Dockerfile\nFROM scratch\nCOPY --from=ghcr.io/frantjc/dockerfile-addendum /addendum /usr/local/bin\nARG tgz=zip_3.0_x86_64.tgz\nADD ${tgz} /tmp\nRUN addendum -ruo /usr/local/bin /tmp/$(basename ${tgz})\n```\n\nNow this Dockerfile can be built with `--build-arg tgz=\u003csrc\u003e` where `\u003csrc\u003e` is either a tar archive at a remote URL or a local tar archive.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrantjc%2Fdockerfile-addendum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrantjc%2Fdockerfile-addendum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrantjc%2Fdockerfile-addendum/lists"}