Of course you can setup separate registry , but for small/local setups it's not so useful. More simple solution (though not scalable) just allow registry to keep images in filesystem on restart.
Making this is relatively simple.
- Allow registry to use host/node file system
oc login -u system:admin
oc adm policy add-scc-to-user hostaccess -z registry -n default
- replace 'emptyDir' with 'hostPath' volume
oc edit dc/docker-registry -n default
And change
volumes:
- emptyDir: {}
name: registry-storage
to
volumes:
- hostPath:
path: /some/path/on/node
name: registry-storage
- Ensure that path is writeable by group (root) - 775
- Re-deploy registry
oc deploy docker-registry --latest --follow=true -n default
No comments:
Post a Comment