Registry¶
push docker image to private registry¶
omit
--passwordso it will not be stored in command historythe
usernamecan be the registry address such asdocker push docker.example.com/uat/redis:0.1.0
create a self-hosted registry¶
https://microsoft.github.io/PartsUnlimitedMRP/adv/adv-24-Docker-Hub.html
https://github.com/distribution/distribution
delete docker images in private registry¶
https://gist.github.com/jaytaylor/86d5efaddda926a25fa68c263830dac1
https://gist.github.com/abelmferreira/c38036f9642f2adf260ad068ac08f187
https://stackoverflow.com/questions/25436742/how-to-delete-images-from-a-private-docker-registry
Steps:
Step 4: Delete the manifest
Garbage collect the image. Run this command in your
config.ymldocker registry container:If setversion: 0.1 log: fields: service: registry storage: cache: blobdescriptor: inmemory filesystem: rootdirectory: /var/lib/registry delete: enabled: true http: addr: :5000 headers: X-Content-Type-Options: [nosniff] health: storagedriver: enabled: true interval: 10s threshold: 3delete: enabled=truethere is no need to set the env varREGISTRY_STORAGE_DELETE_ENABLED.