docs: add documentation + example for DEFAULT_REGISTRIES and READ_ONLY_REGISTRIES

This commit is contained in:
Joxit 2021-11-05 22:39:19 +01:00
parent b323dc6c04
commit 29c17b1baa
No known key found for this signature in database
GPG key ID: F526592B8E012263
5 changed files with 69 additions and 10 deletions

View file

@ -10,4 +10,5 @@
- [Add custom headers bases on environment variable and/or file when the ui is used as proxy](https://github.com/Joxit/docker-registry-ui/tree/main/examples/proxy-headers) ([#89](https://github.com/Joxit/docker-registry-ui/pull/89))
- [UI showing same sha256 content digest for all tags + Delete is not working](https://github.com/Joxit/docker-registry-ui/tree/main/examples/issue-116) ([#116](https://github.com/Joxit/docker-registry-ui/issues/116))
- [Electron-based Standalone Application](https://github.com/Joxit/docker-registry-ui/tree/main/examples/electron) ([#129](https://github.com/Joxit/docker-registry-ui/pull/129))
- [Use docker-registry-ui as proxy with read-only right](https://github.com/Joxit/docker-registry-ui/tree/main/examples/read-only-auth) ([#47](https://github.com/Joxit/docker-registry-ui/issues/47))
- [Use docker-registry-ui as proxy with read-only right](https://github.com/Joxit/docker-registry-ui/tree/main/examples/read-only-auth) ([#47](https://github.com/Joxit/docker-registry-ui/issues/47))
- [Use DEFAULT_REGISTRIES and READ_ONLY_REGISTRIES](https://github.com/Joxit/docker-registry-ui/tree/main/examples/pr-219) ([#219](https://github.com/Joxit/docker-registry-ui/issues/219))

14
examples/pr-219/README.md Normal file
View file

@ -0,0 +1,14 @@
# Example for pull request #219
Basic usage for `DEFAULT_REGISTRIES` and `READ_ONLY_REGISTRIES`.
Behaviors:
- `DEFAULT_REGISTRIES`:
- will set the list of registries in the localstorage when the localstorage is empty.
- will overwrite the list of registries every time when `READ_ONLY_REGISTRIES=true`
- `READ_ONLY_REGISTRIES`:
- will remove dialog for Add and Remove registries
These options works only when `SINGLE_REGISTRY=false`
See [#219](https://github.com/Joxit/docker-registry-ui/pull/219)

View file

@ -0,0 +1,39 @@
version: '2'
services:
registry_1:
image: registry:latest
restart: always
ports:
- 5000:5000
container_name: registry_1
environment:
REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: "['*']"
REGISTRY_STORAGE_DELETE_ENABLED: 'true'
volumes:
- ./data:/var/lib/registry
registry_2:
image: registry:latest
restart: always
ports:
- 5001:5000
container_name: registry_2
environment:
REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: "['*']"
REGISTRY_STORAGE_DELETE_ENABLED: 'true'
volumes:
- ./data:/var/lib/registry
ui:
image: joxit/docker-registry-ui:latest
restart: always
container_name: registry-ui
environment:
- REGISTRY_TITLE=Private Docker Registry
- DEFAULT_REGISTRIES=http://localhost:5000,http://localhost:5001
- DELETE_IMAGES=true
- READ_ONLY_REGISTRIES=true
- SINGLE_REGISTRY=false
ports:
- 80:80