From 531f9400a052880b41a3624e2010d87f194ae703 Mon Sep 17 00:00:00 2001 From: Joxit Date: Sun, 26 Jan 2020 12:00:22 +0100 Subject: [PATCH] chore: add example for #116 --- README.md | 5 ++-- examples/README.md | 5 ++-- examples/issue-116/docker-compose.yml | 41 +++++++++++++++++++++++++++ examples/issue-116/htpasswd | 3 ++ examples/poupulate-registry | 9 ++++++ 5 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 examples/issue-116/docker-compose.yml create mode 100644 examples/issue-116/htpasswd create mode 100755 examples/poupulate-registry diff --git a/README.md b/README.md index 8d9ffe6..10b28eb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ In the **static interface**, it will connect to a single registry and will not c This web user interface uses [Riot](https://github.com/Riot/riot) the react-like user interface micro-library and [riot-mui](https://github.com/kysonic/riot-mui) components. -## [Project Page](https://joxit.dev/docker-registry-ui), [Live Demo](https://joxit.dev/docker-registry-ui/demo/) [Examples](https://github.com/Joxit/docker-registry-ui/tree/master/examples) +## [Project Page](https://joxit.dev/docker-registry-ui), [Live Demo](https://joxit.dev/docker-registry-ui/demo/), [Examples](https://github.com/Joxit/docker-registry-ui/tree/master/examples) ![preview](https://raw.github.com/Joxit/docker-registry-ui/master/docker-registry-ui.gif "Preview of Docker Registry UI") @@ -240,8 +240,9 @@ auth: - [Use docker-registry-ui as a proxy (use REGISTRY_URL)](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-proxy) - [Use docker-registry-ui as standalone (use URL)](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-standalone) - [Use docker-registry-ui with traefik](https://github.com/Joxit/docker-registry-ui/tree/master/examples/traefik) -- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-75) ([#75](https://github.com/Joxit/docker-registry-ui/issues/88)) +- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-75) ([#75](https://github.com/Joxit/docker-registry-ui/issues/75)) - [FIX revproxy to registry does not work when published under non-root url](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-73) ([#73](https://github.com/Joxit/docker-registry-ui/issues/73)) - [Use docker-registry-ui with HTTPS](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-20) ([#20](https://github.com/Joxit/docker-registry-ui/issues/20)) - [Unable to push image when docker-registry-ui is used as a proxy on non 80 port](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-88) ([#88](https://github.com/Joxit/docker-registry-ui/issues/88)) - [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/master/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/master/examples/issue-116) ([#116](https://github.com/Joxit/docker-registry-ui/issues/116)) \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index d804ba2..2e0e408 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,8 +3,9 @@ - [Use docker-registry-ui as a proxy (use REGISTRY_URL)](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-proxy) - [Use docker-registry-ui as standalone (use URL)](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-standalone) - [Use docker-registry-ui with traefik](https://github.com/Joxit/docker-registry-ui/tree/master/examples/traefik) -- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-75) ([#75](https://github.com/Joxit/docker-registry-ui/issues/88)) +- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-75) ([#75](https://github.com/Joxit/docker-registry-ui/issues/75)) - [FIX revproxy to registry does not work when published under non-root url](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-73) ([#73](https://github.com/Joxit/docker-registry-ui/issues/73)) - [Use docker-registry-ui with HTTPS](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-20) ([#20](https://github.com/Joxit/docker-registry-ui/issues/20)) - [Unable to push image when docker-registry-ui is used as a proxy on non 80 port](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-88) ([#88](https://github.com/Joxit/docker-registry-ui/issues/88)) -- [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/master/examples/proxy-headers) ([#89](https://github.com/Joxit/docker-registry-ui/pull/89)) \ No newline at end of file +- [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/master/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/master/examples/issue-116) ([#116](https://github.com/Joxit/docker-registry-ui/issues/116)) \ No newline at end of file diff --git a/examples/issue-116/docker-compose.yml b/examples/issue-116/docker-compose.yml new file mode 100644 index 0000000..636f22d --- /dev/null +++ b/examples/issue-116/docker-compose.yml @@ -0,0 +1,41 @@ +version: '2' + +services: + registry-srv: + image: registry:2.7.1 + restart: always + volumes: + - storage:/var/lib/registry + - ./htpasswd:/etc/docker/registry/htpasswd + ports: + - 5000:5000 + environment: + - REGISTRY_HTTP_HEADERS_X-Content-Type-Options=[nosniff] + - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin=['http://localhost'] + - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods=['HEAD', 'GET', 'OPTIONS', 'DELETE'] + - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers=['Authorization'] + - REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers=['Docker-Content-Digest'] + - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials=['true'] + - REGISTRY_AUTH_HTPASSWD_REALM=basic-realm + - REGISTRY_AUTH_HTPASSWD_PATH=/etc/docker/registry/htpasswd + networks: + - registry-ui-net + container_name: registry-srv + + registry-ui: + image: joxit/docker-registry-ui:static + restart: always + ports: + - 80:80 + environment: + - REGISTRY_TITLE=Private Docker Registry + - URL=http://localhost:5000 + - DELETE_IMAGES=true + container_name: registry-ui + +networks: + registry-ui-net: + +volumes: + storage: + driver: local diff --git a/examples/issue-116/htpasswd b/examples/issue-116/htpasswd new file mode 100644 index 0000000..2aa7469 --- /dev/null +++ b/examples/issue-116/htpasswd @@ -0,0 +1,3 @@ +# login: registry +# password: ui +registry:$2y$11$1bmuJLK8HrQl5ACS/WeqRuJLUArUZfUcP2R23asmozEpfN76.pCHy \ No newline at end of file diff --git a/examples/poupulate-registry b/examples/poupulate-registry new file mode 100755 index 0000000..9bf4d5c --- /dev/null +++ b/examples/poupulate-registry @@ -0,0 +1,9 @@ +#!/bin/sh + +REGISTRY="${1:-localhost:5000}" + +for image in alpine:latest alpine:edge alpine:3.11 alpine:3.10 alpine:3.9; do + docker pull $image + docker tag $image $REGISTRY/$image + docker push $REGISTRY/$image +done \ No newline at end of file