No repositories directory found inside registry_ DATA_ DIR
Registry uses delete_ docker_ registry_ Solution 1: modify the global configuration file solution 2: modify the third-party plug-in
Registry uses delete_ docker_ registry_ Image delete image
Delete the specified image:
/usr/local/bin/delete_ docker_ registry_ Image - I image name
delete the specified image label:
/usr/local/bin/delete_ docker_ registry_ Image - I image name: label
Delete error
REGISTRY_ DATA_ Dir is the directory corresponding to the private library file mapped to the local volume
[root@bigdata ~]# delete_docker_registry_image --image ssh-web-console:latest
No repositories directory found inside REGISTRY_DATA_DIR /opt/registry_data/docker/registry/v2
Solution 1: modify the global configuration file
This method is suitable for using delete on the server_ docker_ registry_ Image three party plug-in for image deletion of docker private library
[root@bigdata ~]# vim /etc/profile
'''
export REGISTRY_DATA_DIR=/data/docker/registry/docker/registry/v2
"/etc/profile" 86L, 2182C
Solution 2: modify the third-party plug-in
This method is applicable to the server, and it is also applicable to delete when calling shell command with background service_ docker_ registry_ Image three party plug-in for image deletion of docker private library
[root@bigdata ~]# vim /usr/local/bin/delete_docker_registry_image
'''
if 'REGISTRY_DATA_DIR' in os.environ:
registry_data_dir = os.environ['REGISTRY_DATA_DIR']
else:
registry_data_dir = "/root/data/registry/docker/registry/v2"//Here is the path to your own mirror repository
try:
cleaner = RegistryCleaner(registry_data_dir, dry_run=args.dry_run)
if args.untagged:
cleaner.delete_untagged(image)
else:
if tag:
cleaner.delete_repository_tag(image, tag)
else:
cleaner.delete_entire_repository(image)
if args.prune:
cleaner.prune()
except RegistryCleanerError as error:
logger.fatal(error)
sys.exit(1)
if __name__ == "__main__":
main()
Read More:
- [Solved] Mac Install mongodb error: NonExistentPath: Data directory /data/db not found.
- [Solved] Failed to load response data: no data found for resource with given identifier
- [Solved] error: #error “Please include Eigen/Geometry instead of including headers inside the src directory d
- [Solved] MYSQLD: Can‘t create directory ‘/usr/local/mysql/data/’(Errcode:2 -No such file or directory)
- Vue Error: command failed: npm install –loglevel error –registry=https://registry.npm.taobao.org
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- [Solved] Xcode error: cycle inside*******; building could produce unreliable results.
- crtdbg.h No such file or directory error [How to Solve]
- [Solved] Bringing up interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’.
- Android: Can’t create handler inside thread that has not called Looper.prepare() [Solved]
- Docker Create tomcat Error standard_init_linux.go:211: exec user process caused “no such file or directory”
- [Solved] PostgreSQL Error: Could not connect to server: no such file or directory
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- Gradle Package Project Lombok Not Working: No serializer found for class com.qbb.User and no properties discovered to create BeanSerializer……
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- [Solved] the SDK location is inside Studio‘s install location
- [Solved] open failed: ENOENT (No such file or directory)
- fatal error: libusb.h: No such file or directory [How to Solve]
- [Solved] MAC Nginx Error: ginx.pid“ failed (2: No such file or directory)
- [Solved] MSYS2+ fatal error: zlib.h: There is no such file or directory