{"id":27954896,"url":"https://github.com/garfieldius/docktar","last_synced_at":"2026-05-05T12:31:15.266Z","repository":{"id":141119019,"uuid":"92537908","full_name":"garfieldius/docktar","owner":"garfieldius","description":"Create docker friendly tars with binaries for single ADD commands","archived":false,"fork":false,"pushed_at":"2017-05-26T18:29:10.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T17:44:34.805Z","etag":null,"topics":["docker","docker-image","dockerfile","tar"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garfieldius.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":"2017-05-26T18:27:12.000Z","updated_at":"2017-08-21T20:13:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"7246bf9a-0cf7-4bc2-85ef-0c49fa0ec32e","html_url":"https://github.com/garfieldius/docktar","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/garfieldius/docktar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garfieldius%2Fdocktar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garfieldius%2Fdocktar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garfieldius%2Fdocktar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garfieldius%2Fdocktar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garfieldius","download_url":"https://codeload.github.com/garfieldius/docktar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garfieldius%2Fdocktar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32649504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","docker-image","dockerfile","tar"],"created_at":"2025-05-07T17:35:52.484Z","updated_at":"2026-05-05T12:31:15.258Z","avatar_url":"https://github.com/garfieldius.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docktar\n\ndocktar is a small script / program that adds one or more binary files,\nwith all dynamic libraries they need into a single tar archive file.\n\nThis allows for creating much smaller and easier to maintain docker\nimages by adding only the data required.\n\nIt can, optionally, strip debugging symbols from binary files and\nadd non-executable files, like configrations or data files, without\nprocessing them.\n\n**Important**: docktar only works on linux systems with linux binaries!\n\n## Installation\n\nWith a properly setup go environment, `go get` will install the latest version:\n\n```bash\ngo get github.com/garfieldius/docktar\n```\n\nReady to use binaries can be found in the releases section. After the download\nthey must be put into a directory in $PATH and marked executable.\n\n## Usage\n\n### Running docktar\n\n#### Creating archives\n\ndocktar is started on a command line with one or several full filepaths as arguments.\n\n```bash\ndocktar $(which gawk) /bin/sed\n```\n\nThe file will have the same filepath within the tar archive. A different path is set\nby adding it after the source path, divided by a colon:\n\n```bash\ndocktar /usr/bin/gawk:/bin/awk\n```\n\nIf the file path is relative it will be expanded to absolute. Files in $PATH can be\nadded without a directory in the argument. Docktar will add them with the directory\nthey are found in.\n\n```bash\ndocktar awk # Adds awk as \"/usr/bin/awk\"\n```\n\nNote that symlinks are resolved, but not added. So if the above example is\na link to `/usr/bin/gawk`, the content of the link target is added under the name\nof the link itself.\n\nThe following three commands will create the same tar archive:\n\n```bash\ndocktar awk\ndocktar $(which awk)\ndocktar $(readlink $(which awk)):/usr/bin/awk\n```\n\nMultiple files can be added with multiple arguments and/or globbing. When using\nthe latter, escape the argument to ensure the pattern is not expaned by the shell:\n\n```bash\n# Add PHP for CLI and FPM, and all its extensions and ini files\ndocktar php php-fpm \"/usr/lib/php/**/*.so\" \"/etc/php/**/*.ini\"\n```\n\n#### Switches\n\nBy default, docktar will save the resulting archive in a file named `docker.tar`\nwithin the current working directory. The `-o` flag sets a different filename.\nSetting `-o` to `-` will write the archive to stdout:\n\n```bash\ndocktar -o sed.tar /bin/sed\n# or\ndocktar -o - /bin/sed \u003e sed.tar\n```\n\nWith the `-s` switch, all files will be stripped of debugging symbols. This\nrequired the program `strip` to be installed.\n\n```bash\ndocktar -s $(which sed)\n```\n\nAdding `-d` creates a `Dockerfile` next to the written .tar file, containing\nthe minimum commands to create an image.\n\n### Using the archive\n\nA Dockerfile that starts from `scratch` and `ADD`s the archive into `/` will\nplace the content of the archive into a new image.\n\nWith a Dockerfile like this:\n\n```Dockerfile\nFROM scratch\n\nADD docker.tar /\n```\n\nThe image can be build and a container started:\n\n```bash\n% docktar /bin/sed\n% docker build -t sed .\n% docker run --rm sed /bin/sed\nUsage: /bin/sed [OPTION]... {script-only-if-no-other-script} [input-file]...\n...\n```\n\nNote: The Dockerfile example above is the same that is created\nwith the `-d` switch.\n\n## License\n\n(c) 2017 by Georg Großberger \u003ccontact@grossberger-ge.org\u003e\n\nLicensed under the GPLv3\nSee the file LICENSE or \u003chttps://www.gnu.org/licenses/gpl-3.0.html\u003e for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarfieldius%2Fdocktar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarfieldius%2Fdocktar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarfieldius%2Fdocktar/lists"}