{"id":30547976,"url":"https://github.com/mrpye/cimpex","last_synced_at":"2026-05-10T16:11:53.863Z","repository":{"id":92619797,"uuid":"593545729","full_name":"Mrpye/cimpex","owner":"Mrpye","description":"Docker image Import Export tool using Rest API Endpoint","archived":false,"fork":false,"pushed_at":"2023-03-28T14:43:22.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T07:52:41.166Z","etag":null,"topics":["docker-image","docker-tar","export-docker-images","go","golang","harbor","harbor-registry","import-docker-image","registry","rest-api","util","utilities","utility"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mrpye.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":"2023-01-26T09:21:47.000Z","updated_at":"2024-01-21T20:33:07.000Z","dependencies_parsed_at":"2024-06-21T16:51:00.738Z","dependency_job_id":"f591ad6e-3e53-4f16-b31e-4fa794adbd40","html_url":"https://github.com/Mrpye/cimpex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Mrpye/cimpex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrpye%2Fcimpex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrpye%2Fcimpex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrpye%2Fcimpex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrpye%2Fcimpex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mrpye","download_url":"https://codeload.github.com/Mrpye/cimpex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrpye%2Fcimpex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272425733,"owners_count":24932919,"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-28T02:00:10.768Z","response_time":74,"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-image","docker-tar","export-docker-images","go","golang","harbor","harbor-registry","import-docker-image","registry","rest-api","util","utilities","utility"],"created_at":"2025-08-28T03:01:30.947Z","updated_at":"2026-05-10T16:11:48.828Z","avatar_url":"https://github.com/Mrpye.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cimpex - Container Import Export Utility\nExport and import docker images from a registry without docker\n\n## Description\nThe solution enables you to easily export and import Docker containers from a registry without the need to install docker.\nIt also can be run as a web-server allowing you to perform the Import Export via REST API\n\n## When to use Cimpex\nCimpex can be used when you want to automate the import and export of docker images from a registry if you need to transport images between sites that don't have internet access. Also can be used as part of your CI/CD pipeline.\n\n---\n## Requirements\n* A Container registry to import or export from.\n* you will need to install go 1.8 [https://go.dev/doc/install](https://go.dev/doc/install) to run and install Cimpex\n\n---\n\n## Project folders\nBelow is a description cimpex project folders and what they contain\n|   Folder        | Description  | \n|-----------|---|\n| charts    | Contains the helm chart for cimpex  |\n| docs      | Contains the swagger documents |\n| documents | Contains cli and api markdown files  |\n| modules   | Contains cimpex modules and code  |\n| config    | Contains Example payload config files  |\n| cmd       | Contains code for cimpex CLI   |\n|           |   |\n\n---\n\n## Installation\n\n```yaml\ngo install github.com/Mrpye/cimpex\n```\n\n## Run as a container\n\n\u003cdetails\u003e\n\u003csummary\u003e1. Clone the repository\u003c/summary\u003e\n\n```\ngit clone https://github.com/Mrpye/cimpex.git\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e2. Build the container as API endpoint\u003c/summary\u003e\n\n```\nsudo docker build . -t  cimpex:v1.0.0 -f Dockerfile\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e3. Run the container\u003c/summary\u003e\n\n```\nsudo docker run -d -p 9020:8080 --name=cimpex --restart always  -v /host_path/images:/go/bin/images --env=BASE_FOLDER=/go/bin/images --env=WEB_IP=0.0.0.0  --env=WEB_PORT=8080 -t cimpex:1.0.0\n```\n\n\u003c/details\u003e\n\n---\n\n### Environment  variables\n- BASE_FOLDER (set where the images will be exported)\n- WEB_IP (set the listening ip address 0.0.0.0 allow from everywhere)\n- WEB_PORT (set the port to listen on)\n\n\n---\n## How to use Cimpex CLI\nCheck out the CLI documentation [here](./documents/cimpex.md)\n\n---\n\n# Using the API\n\n## Run web server\n```bash\n    cimpex web -f /go/bin/images -p 8080 -i 0.0.0.0\n```\n---\n\n## Examples\n\n\u003cdetails\u003e\n\u003csummary\u003eExport image from a registry\u003c/summary\u003e\n\nExport and image fromm a registry with no authentication\n\n``` bash\ncurl --location --request POST 'http://localhost:8080/export' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"target\":\"cimpex:v1.0.0\",\n    \"tar\":\"cimpex-v1-0-0.tar\",\n    \"ignore_ssl\":true\n}\n```\n\nExport from a registry with authentication\n\n```bash\ncurl --location --request POST 'http://localhost:8080/export' \\\n--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"target\":\"127.0.0.1/library/cimpex:v1.0.0\",\n    \"tar\":\"cimpex-v1-0-0.tar\",\n    \"ignore_ssl\":true\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eExport multiple images from a registry\u003c/summary\u003e\n\n## Export images from a registry\n``` bash\ncurl --location --request POST 'http://localhost:8080/exports' \\\n--header 'Content-Type: application/json' \\\n--data-raw '[{\n    \"target\":\"cimpex:v1.0.0\",\n    \"tar\":\"cimpex-v1-0-0.tar\",\n    \"ignore_ssl\":true\n},\n{\n    \"target\":\"helm-api:v1.0.0\",\n    \"tar\":\"helm-api-v1-0-0.tar\",\n    \"ignore_ssl\":true\n}\n]\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eImport image to a registry\u003c/summary\u003e\n\nImport an image and specify the name at tag to use\n\n```bash\ncurl --location --request POST 'localhost:8080/import' \\\n--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"target\":\"library/bind:test\",\n    \"tar\":\"bind-latest.tar\",\n    \"ignore_ssl\":true\n}'\n```\n\nImport an image and use the name at tag from the tar file\n\n```bash\ncurl --location --request POST 'localhost:8080/import' \\\n--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"target\":\"library/\",\n    \"tar\":\"bind-latest.tar\",\n    \"ignore_ssl\":true\n}'\n```\n\n## Json Payload\n\n- target (location of the docker image import/export)\n- tar (name of the tar file will be saved in the export folder)\n- ignore_ssl (Ignore ssl cert)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImport images to a registry from the BASE_FOLDER\n folder\u003c/summary\u003e\n\nImport an images and imports to the target registry\n\n```bash\ncurl --location 'localhost:8080/imports' \\\n--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"target\":\"127.0.0.1/library/\",\n    \"ignore_ssl\":true\n}'\n\n```\n\n## Json Payload\n\n- target (the docker registry)\n- ignore_ssl (Ignore ssl cert)\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eList images in the folder\u003c/summary\u003e\n\n```bash\ncurl --location --request POST ''http://localhost:8080/list' \\\n--header 'Content-Type: application/json' \n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eTest is alive\u003c/summary\u003e\n\n```bash\ncurl --location --request GET ''http://localhost:8080/'\n```\nReturn OK\n\u003c/details\u003e\n\n---\n## cimpex Helm chart\nThis guide will show you how to build the helm chart package for cimpex, you will need to have helm installed to build the package.\n\n\u003cdetails\u003e\n\u003csummary\u003e1. Build the helm chart package for cimpex\u003c/summary\u003e\n\n```bash\n# change into the chart directory\ncd charts\n# Package the cimpex chart\nhelm package cimpex\n\n```\n\nthe helm chart package will be saved under the charts folder cimpex-0.1.0.tgz\n\n\u003c/details\u003e\n\n---\n\n## Update the swagger document\nThe code below shows you how to update the swagger API documents.\n\nIf you need more helm on using these tools please refer to the links below\n- gin-swagge [https://github.com/swaggo/gin-swagger](https://github.com/swaggo/gin-swagger)\n- swag [https://github.com/swaggo/swag](https://github.com/swaggo/swag)\n\n\u003cdetails\u003e\n\u003csummary\u003e1. Install swag\u003c/summary\u003e\n\n```bash\n#Install swag\ngo install github.com/swaggo/swag/cmd/swag\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e2. Update APi document\u003c/summary\u003e\n\n```bash\n#update the API document\nswag init\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e3. Update the api.md\u003c/summary\u003e\n\n```bash\nswagger generate markdown -f .\\docs\\swagger.json --output .\\documents\\api.md \n```\n\u003c/details\u003e\n\n---\n\n# To Do\n- improve validation and error handling\n\n---\n\n# 3rd party Libraries\nhttps://github.com/google/go-containerregistry\n\n---\n# license\ncimplex is Apache 2.0 licensed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrpye%2Fcimpex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrpye%2Fcimpex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrpye%2Fcimpex/lists"}