{"id":13416438,"url":"https://github.com/mudler/docker-companion","last_synced_at":"2025-07-17T19:37:28.276Z","repository":{"id":8239044,"uuid":"57236065","full_name":"mudler/docker-companion","owner":"mudler","description":"squash and unpack Docker images, in Golang","archived":false,"fork":false,"pushed_at":"2023-05-12T06:04:45.000Z","size":3206,"stargazers_count":45,"open_issues_count":5,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T11:41:28.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mudler.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}},"created_at":"2016-04-27T18:21:54.000Z","updated_at":"2025-02-09T09:27:39.000Z","dependencies_parsed_at":"2024-04-10T09:46:59.479Z","dependency_job_id":"0f8c016f-88d9-4b4c-a9fc-b536a3380bc2","html_url":"https://github.com/mudler/docker-companion","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudler%2Fdocker-companion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudler%2Fdocker-companion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudler%2Fdocker-companion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mudler%2Fdocker-companion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mudler","download_url":"https://codeload.github.com/mudler/docker-companion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249762410,"owners_count":21321929,"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-07-30T21:00:58.847Z","updated_at":"2025-04-19T18:25:03.178Z","avatar_url":"https://github.com/mudler.png","language":"Go","readme":"# docker-companion [![Build Status](https://travis-ci.org/mudler/docker-companion.svg?branch=master)](https://travis-ci.org/mudler/docker-companion)\n\ndocker-companion is a candy mix of tools for docker written in Golang and directly using Docker API calls. As for now it allows to squash and unpack an image.\n\n## Reinventing the wheel?\n\nProblem arises with current tools to squash/unpack images since mostly of them are scripted. I personally needed a static implementation with no-deps hell that i could use in my CI pipeline easily (and also to get the job done).\n\n## Download and unpack image \n\nNote: Doesn't require a docker daemon running on the host.\n\n    docker-companion download my-awesome-image /unpacked_rootfs\n    \nDownloads and reconstruct all the image layers,\nunpacking the content to the directory given as second argument.\n\n## Squash an image\n\nThe resulting image will loose metadata, but it is handy to reduce image size:\n\n    docker-companion squash my-awesome-image my-awesome-image-squashed\n\nYou can also make it pull before squashing it:\n\n    docker-companion --pull squash my-awesome-image my-awesome-image-squashed:mytag\n\nOr just squashing an image\n\n    docker-companion squash my-awesome-image\n\nto directly remove the intermediary (the source image, which will loose the tag)\n\n    docker-companion squash --remove my-awesome-image\n\n## Unpack an image\n\n    docker-companion unpack my-awesome-image /my/path\n\nThe path must be absolute, and you must run it with root permission to keep file permissions.\n\nYou can squash the image right before unpacking it too:\n\n    docker-companion --pull unpack --squash my-awesome-image /my/path\n\nIt can be handy sometimes to squash the image before unpacking it (very few cases where the latter fails)\n\nYou can supply also the --fatal global option to treat all warnings as fatal:\n\n    docker-companion --fatal --pull unpack --squash my-awesome-image /my/path\n\n## Get Latest release from github for amd64\n\n```bash\ncurl -s https://api.github.com/repos/mudler/docker-companion/releases/latest \\\n| grep \"browser_download_url.*amd64\" \\\n| cut -d : -f 2,3 \\\n| tr -d \\\" \\\n| wget -i - -O docker-companion\n```\n","funding_links":[],"categories":["Docker Images","Dev Tools"],"sub_categories":["Builder"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmudler%2Fdocker-companion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmudler%2Fdocker-companion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmudler%2Fdocker-companion/lists"}