{ "info": { "author": "Ingo Heimbach", "author_email": "i.heimbach@fz-juelich.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: System :: Systems Administration" ], "description": "GitLab-Registry-Cleanup\n=======================\n\nIntroduction\n------------\n\n*GitLab-Registry-Cleanup* is a Python package for finding and (soft)\ndeleting untagged Docker images in a GitLab Docker registry. Currently\n(April 2018), Docker registries only cleanup data if the removal of an\nimage is requested explicitly by the user. Therefore, **the registry\nwill keep on growing** if users only push new images. **Overwriting\nexisting tags is not sufficient** since images could be referenced by\ntheir SHA256 hash by an external resource. This tool assumes that\nuntagged images are not needed any more and deletes them explicitly. It\ncan only be used for the embedded registry of a GitLab server.\n\n**NOTE**: ``registry garbage-collect`` will have a ``-m`` flag in 2.7.0,\nsee `issue #1844 `__\nand `pull request\n#2302 `__.\n\nInstallation\n------------\n\nThe latest version is available from PyPI and needs Python 3.3+:\n\n.. code:: bash\n\n python3 -m pip install gitlab-registry-cleanup\n\nThis package can only be used on a GitLab server, since it needs read\naccess to the Docker registry files stored on disk. The script needs\nroot privileges, so either use the root account or the ``sudo`` utility.\nThe actual deletion of images is done via the GitLab web api to prevent\nany data loss.\n\nIf you use the recommended operating system for GitLab (Ubuntu Server),\nyou can install Python 3 and ``pip`` with\n\n.. code:: bash\n\n apt install python3-pip\n\nif not already installed.\n\nUsage\n-----\n\nCommand Line Interface\n~~~~~~~~~~~~~~~~~~~~~~\n\nAfter installing with ``pip``, a ``gitlab-registry-cleanup`` command is\navailable:\n\n::\n\n usage: gitlab-registry-cleanup [-h] [-g GITLAB_SERVER] [-r REGISTRY_SERVER]\n [-p LOCAL_REGISTRY_ROOT] [-c CREDENTIALS_FILE]\n [-u USERNAME] [-n] [-k] [-V]\n\n gitlab-registry-cleanup is a utility for cleaning up a GitLab registry by soft deleting untagged images.\n\n optional arguments:\n -h, --help show this help message and exit\n -g GITLAB_SERVER, --gitlab-server GITLAB_SERVER\n GitLab server hostname (for example `mygitlab.com`)\n -r REGISTRY_SERVER, --registry-server REGISTRY_SERVER\n GitLab registry server hostname (for example\n `registry.mygitlab.com`)\n -p LOCAL_REGISTRY_ROOT, --registry-path LOCAL_REGISTRY_ROOT\n Path to the registry directory on the GitLab server\n (default: /var/opt/gitlab/gitlab-\n rails/shared/registry)\n -c CREDENTIALS_FILE, --credentials-file CREDENTIALS_FILE\n path to a file containing username and password/access\n token (on two separate lines)\n -u USERNAME, --user USERNAME\n user account for querying the GitLab API (default:\n root)\n -n, --dry-run only print which images would be deleted\n -k, --insecure allow insecure connections over plain HTTP\n -V, --version print the version number and exit\n\nYou should specify a GitLab server hostname (``-g``), a GitLab registry\nserver hostname (``-r``) and either a credentials file (``-c``) or\nusername (``-u``) and password (read from stdin).\n\nFinal disk cleanup\n~~~~~~~~~~~~~~~~~~\n\n``gitlab-registry-cleanup`` only *soft* deletes images. As a result,\nimages are removed but their data (the image layers) are still stored on\ndisk. To delete unused image layers, you must run the Docker registry\ngarbage collector. If you have installed the GitLab omnibus package, you\ncan run the following commands:\n\n.. code:: bash\n\n sudo gitlab-ctl registry-garbage-collect\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sciapp/gitlab-registry-cleanup", "keywords": "Git,GitLab,Docker,Registry,Cleanup", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gitlab-registry-cleanup", "package_url": "https://pypi.org/project/gitlab-registry-cleanup/", "platform": "", "project_url": "https://pypi.org/project/gitlab-registry-cleanup/", "project_urls": { "Homepage": "https://github.com/sciapp/gitlab-registry-cleanup" }, "release_url": "https://pypi.org/project/gitlab-registry-cleanup/0.1.7/", "requires_dist": [ "gitlab-registry-usage (>=0.2.1)", "typing" ], "requires_python": "~=3.3", "summary": "A tool to clean up untagged GitLab registry images.", "version": "0.1.7" }, "last_serial": 4486232, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a6be87b741ed0ffb18a956a57a1c6ba8", "sha256": "4b8cc20c5e4e152861174c8090c95d37892302b9362e431834289d512063391c" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a6be87b741ed0ffb18a956a57a1c6ba8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9884, "upload_time": "2018-04-05T16:38:01", "url": "https://files.pythonhosted.org/packages/d3/eb/c4dcd124ddb6b2c002bb74015767b486fdebc7dd099f25538f99eef6f5bb/gitlab_registry_cleanup-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e833ff72c3f94611bd43662948c1bc2", "sha256": "21542a7f276846faa51201a2fdf37297edaf8b43b89936f0da71380f1185d32e" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3e833ff72c3f94611bd43662948c1bc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7448, "upload_time": "2018-04-05T16:38:01", "url": "https://files.pythonhosted.org/packages/c2/96/ce65a09e17ff5edaa54b3afb6f6b3fcaf8df48ac30c9e38a2e373d5bf5d6/gitlab-registry-cleanup-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1d774c4bd8b8a9ddd016d31fc16c3c6f", "sha256": "c00342ef042899be7d208a9608c212e22ffdd0cc6cbbf21481379dfdf0df6a5d" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1d774c4bd8b8a9ddd016d31fc16c3c6f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 10081, "upload_time": "2018-06-04T08:41:05", "url": "https://files.pythonhosted.org/packages/4a/82/340e690a248f5135922b0b96e0a3f6c85585be736409d3fc47966b72e1aa/gitlab_registry_cleanup-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "63ce356c3816c3a9c89c59fe64380756", "sha256": "f0a21d2ae0e609a4eed0e7aa2c22db5091b5ebc0015fab5a4db803e3ab142d35" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.1.tar.gz", "has_sig": false, "md5_digest": "63ce356c3816c3a9c89c59fe64380756", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 7596, "upload_time": "2018-06-04T08:41:06", "url": "https://files.pythonhosted.org/packages/b8/3d/ad26c4db3cde2f13ca19665199426f9f9c66de5c3a8346cb2288b3b56f97/gitlab-registry-cleanup-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "12d573defc0b97e6892d825542653b0d", "sha256": "bfdf6e0218f4b00b11b118373ff40619174f0192d736abb135268e2d845ead95" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "12d573defc0b97e6892d825542653b0d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 10036, "upload_time": "2018-08-02T09:01:36", "url": "https://files.pythonhosted.org/packages/43/f0/fbe8e1c739b07d24fd7f35318bac6133ada4470d96e78867e3ebbb5854aa/gitlab_registry_cleanup-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8ff20ac90c7044bf346cf0b73fe177df", "sha256": "5dcac7ac163a54171df2b155a8cc65ff25a2652ea5abcc3d19839c2da073ee13" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8ff20ac90c7044bf346cf0b73fe177df", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 7603, "upload_time": "2018-08-02T09:01:37", "url": "https://files.pythonhosted.org/packages/e8/94/dbd7015162274c08152ac4594cdb8e4a616342eb4ab796ea2556e2ef8b3d/gitlab-registry-cleanup-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e541ee2b85937ca683c3392300ead5b4", "sha256": "1d85dc3b32eee646f08be7237f2a8a488858af44e02d01a2c89fadd258063445" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e541ee2b85937ca683c3392300ead5b4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 10044, "upload_time": "2018-08-15T14:20:12", "url": "https://files.pythonhosted.org/packages/e6/d3/012fedd0ff01bd9dd7ab98fdd58fa7543b7b5308073d72d0e7930a3fc17f/gitlab_registry_cleanup-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d083cd90a86ca1a35a971a5292b5196a", "sha256": "aec3a7e7541ccc07c608234dd40c10a2413a408f4013b5cabc24379fa9837106" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d083cd90a86ca1a35a971a5292b5196a", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 7615, "upload_time": "2018-08-15T14:20:14", "url": "https://files.pythonhosted.org/packages/e6/93/1a4a246b07487140e34bab9bb305d395105c112dc88ad608b354ba6a10f1/gitlab-registry-cleanup-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "95f813d3b81586c32749f01387bdabf4", "sha256": "9834980bdc3a5438c558f664ec9a4218e82743c9374587fd99b8deadb0296ad1" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "95f813d3b81586c32749f01387bdabf4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 10181, "upload_time": "2018-09-12T14:10:43", "url": "https://files.pythonhosted.org/packages/f3/7e/a569b8eb5488447ba1676010d1be9ee1932213c26e95eeb1368562033e92/gitlab_registry_cleanup-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad4b95c957876f0260c48bc1d9a61f7f", "sha256": "0f89ef50f381e2bd13eebc5c5030ba878b2782a1f47c4d21b88939456f1c8366" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ad4b95c957876f0260c48bc1d9a61f7f", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 7648, "upload_time": "2018-09-12T14:10:44", "url": "https://files.pythonhosted.org/packages/61/13/fd4afc717ce7c5ba1216ab6b40da1472127368c3fcdb62f22f50d1c85941/gitlab-registry-cleanup-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "4bbb9018eca40d72714d18b41daeb84d", "sha256": "b8d232a600e23bf4f9e697ab0cdf9e2b201b047ad477d8e4176e7a9df554cb3c" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4bbb9018eca40d72714d18b41daeb84d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 10374, "upload_time": "2018-09-14T10:37:06", "url": "https://files.pythonhosted.org/packages/54/0e/ae092430a0eab852b24f89c700d972f53e956d9efe54905f3c891e46f038/gitlab_registry_cleanup-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ce1c768a8481d760486550752f252c7", "sha256": "cd339626f49eaa4cb2983041fa72684277846d72eccb3319b7e42c342d93c1a1" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2ce1c768a8481d760486550752f252c7", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 7741, "upload_time": "2018-09-14T10:37:08", "url": "https://files.pythonhosted.org/packages/8e/ea/8036c95b89116258a6627763c9b5bf50a1ef2d3e09391452921e8d994bf2/gitlab-registry-cleanup-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "24078603019b565b19a6d9ec000e41fc", "sha256": "5d893a854ed5d06e74f4eafa7d177b4d2cc6681ba7031f9dda23f0fee3b7beb1" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "24078603019b565b19a6d9ec000e41fc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 8087, "upload_time": "2018-11-07T11:15:31", "url": "https://files.pythonhosted.org/packages/9c/6b/d555073f71bccc296bee36396300c625fef005e4a2baeac2dd02ea4903f1/gitlab_registry_cleanup-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3981cd1434be5898f7a30b5f5c5a9fc", "sha256": "8df3740eafaaaa0a5299ab2aeae18eeb79a7268c953f2585a924a324dfb93a5b" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a3981cd1434be5898f7a30b5f5c5a9fc", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 8016, "upload_time": "2018-11-07T11:15:33", "url": "https://files.pythonhosted.org/packages/93/95/9b51500f0ef46db7c6bf082ca86077102613ee2f3fcf18e77935107eef59/gitlab-registry-cleanup-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "54dc85265d836e2b372b90f3ed846019", "sha256": "9bb61ac6d33c7a1a00056c9c82e548b187bd51ea438605914d37dc23ca31e459" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "54dc85265d836e2b372b90f3ed846019", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 8413, "upload_time": "2018-11-14T16:23:36", "url": "https://files.pythonhosted.org/packages/ae/03/b6e7268b8ebba7c8636f56249597877fb9763880aa26051a00c3b34ab8ba/gitlab_registry_cleanup-0.1.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a18c4d9af4163a16629824a3d6bdc407", "sha256": "c223fb72c942d0ece51e2981d4a17f9cf3676329572272f070d7d38dae574b52" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.7.tar.gz", "has_sig": false, "md5_digest": "a18c4d9af4163a16629824a3d6bdc407", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 8329, "upload_time": "2018-11-14T16:23:38", "url": "https://files.pythonhosted.org/packages/8c/ae/2a3898ab813c63553c165910ca6265132382e2f4b47de043c04b0958db8b/gitlab-registry-cleanup-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54dc85265d836e2b372b90f3ed846019", "sha256": "9bb61ac6d33c7a1a00056c9c82e548b187bd51ea438605914d37dc23ca31e459" }, "downloads": -1, "filename": "gitlab_registry_cleanup-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "54dc85265d836e2b372b90f3ed846019", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.3", "size": 8413, "upload_time": "2018-11-14T16:23:36", "url": "https://files.pythonhosted.org/packages/ae/03/b6e7268b8ebba7c8636f56249597877fb9763880aa26051a00c3b34ab8ba/gitlab_registry_cleanup-0.1.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a18c4d9af4163a16629824a3d6bdc407", "sha256": "c223fb72c942d0ece51e2981d4a17f9cf3676329572272f070d7d38dae574b52" }, "downloads": -1, "filename": "gitlab-registry-cleanup-0.1.7.tar.gz", "has_sig": false, "md5_digest": "a18c4d9af4163a16629824a3d6bdc407", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.3", "size": 8329, "upload_time": "2018-11-14T16:23:38", "url": "https://files.pythonhosted.org/packages/8c/ae/2a3898ab813c63553c165910ca6265132382e2f4b47de043c04b0958db8b/gitlab-registry-cleanup-0.1.7.tar.gz" } ] }