Compare commits

...

91 Commits
1.4.5 ... 2.0.4

Author SHA1 Message Date
Joxit
e0ec86503a fix: can't view platform specific tag info (#198) 2021-06-24 09:31:32 +02:00
Joxit
b97ee4bc60 fix: alt-click does not work correctly with search (#196)
fixes #196
2021-06-23 20:42:48 +02:00
Joxit
a19c992d5a build: generate build for v2.0.2 2021-06-08 17:54:10 +02:00
Joxit
6c8b929e4f fix: delete button is displayed when DELETE_IMAGES is set to false
fixes #192
2021-05-20 18:49:39 +02:00
Joxit
4fcbea698b docs: update gif for 2.0 2021-05-12 18:05:40 +02:00
Joxit
999e5ae1c6 docs: more explanations for REGISTRY_URL and NGINX_PROXY_PASS_URL options 2021-05-11 10:19:15 +02:00
Joxit
8b9efa0397 fix: add default value for NGINX_PROXY_HEADER_Host
fixes #181
2021-05-08 21:32:31 +02:00
Joxit
1c88ad57f8 build: release 2.0.0 🚀 2021-04-28 23:54:03 +02:00
Joxit
c66887fac7 fix: wrong commit for riot-mui version 2021-04-27 10:02:01 +02:00
Jones Magloire
3dc035dac8 feat: show confirm dialog before deleting images (#182) 2021-04-27 09:52:34 +02:00
Joxit
29cd2b7a8f feat(confirm-delete): add dialog for single image delete 2021-04-26 22:31:11 +02:00
Joxit
e065298eed feat(confirm-delete): add dialog for confirmation of multiple image delete 2021-04-24 22:35:10 +02:00
Joxit
f02c99f12d chore: update riot-mui version for dialogs 2021-04-21 23:08:28 +02:00
Joxit
7eed05ae50 feat: show the number of images and repositories in catalog 2021-04-14 23:22:00 +02:00
callmebob2016
7a35d61359 docs: fix typo in ui-as-standalone example (#180) 2021-04-13 17:13:50 +02:00
Joxit
e990c39a18 feat: allow sorting of tags by creation date and size (#125)
closes #125
2021-04-13 05:43:23 +02:00
Jones Magloire
3bfe107e3c feat: add token authentication with keycloak (#167) 2021-04-12 00:43:15 +02:00
Joxit
0f54555b52 fix: env variables in entrypoint and blank demo page 2021-04-11 02:09:52 +02:00
Joxit
1ca1a1a207 docs(token-auth-keycloak): add tutorial for the example 2021-04-10 17:00:16 +02:00
Joxit
bc5082dcf9 feat(token-auth-keycloak): remove custom dialog and use browser basic auth with nginx configuration 2021-04-09 17:28:48 +02:00
Joxit
58b1486c81 feat(token-auth-keycloak): add token auth via keycloak using docker protocol 2021-04-08 18:11:08 +02:00
Joxit
2c9f006b8c docs(token-auth-keycloak): add missing ui in proxy configuration 2021-04-07 06:11:55 +02:00
Joxit
026cf8ccdc docs: add exemple for keycloak with token auth on docker registry 2021-04-07 06:11:55 +02:00
Joxit
69066dd867 ci: add debian latest and master/main version 2021-04-07 06:11:23 +02:00
Joxit
6d4d507db5 fix: lifecycle for copy to clipboard and remove image 2021-04-06 06:16:01 +02:00
Jones Magloire
83f15aa267 feat: add ability to search images and tags by name (#177) 2021-04-05 00:01:54 +02:00
Joxit
b643a44113 feat(search-bar): add search bar to tag-list, this will filter tag names 2021-04-04 05:59:15 +02:00
Joxit
a2b3c592df feat(search-bar): add search bar to catalog, this will filter images 2021-04-02 04:56:31 +02:00
Jones Magloire
263584fc43 feat: upgrade to riot v5 (#176)
See [migration guide](https://github.com/Joxit/docker-registry-ui/wiki/Migrating-from-1.x-to-2.x)
2021-04-01 19:58:27 +02:00
Joxit
1173453f72 feat: merge static version with latest and add license
BREAKING CHANGE: Now only one tag will be published: `latest`. This tag will include both the standard and latest version
2021-03-31 07:10:50 +02:00
Joxit
7d095916db fix(router): base route does not match ui on custom path 2021-03-30 21:47:28 +02:00
Joxit
8ef411059c feat(riot-v5): handle page query param & refactor router & remove old code 2021-03-29 21:49:37 +02:00
Joxit
603b5861fa feat(riot-v5): upgrade remove-registry-url dialog 2021-03-28 16:17:21 +02:00
Joxit
4ff1b2fabe feat(riot-v5): upgrade change-registry-url dialog 2021-03-27 14:02:10 +01:00
Joxit
e6af9321a8 feat(riot-v5): upgrade add-registry-url dialog 2021-03-26 00:04:28 +01:00
Joxit
bb3182d56e feat(riot-v5): add dialogs menu needs material-dropdown-list update 2021-03-25 20:08:02 +01:00
Joxit
761a680703 feat(riot-v5): add notification via material-snackbar 2021-03-24 00:02:07 +01:00
Joxit
926f67e1b5 feat(riot-v5): re-add ALT+click feature on tag list page 2021-03-23 23:08:59 +01:00
Joxit
781b026471 fix(riot-v5): on page change, selected images for deletion should be cleared
update riot-mui version
2021-03-22 07:59:35 +01:00
Joxit
92fd78165f fix(riot-v5): tag history with multi arch 2021-03-21 13:41:18 +01:00
Joxit
a3276dcb79 feat(riot-v5): upgrade all tag-history components 2021-03-20 08:15:05 +01:00
Joxit
962592c54a fix(riot-v5): fix catalog-element with multi items 2021-03-19 22:14:58 +01:00
Joxit
669c3399d0 feat(riot-v5): upgrade remove-image and copy-to-clipboard 2021-03-16 21:44:42 +01:00
Joxit
9c303d32c7 feat(riot-v5): upgrade image content-digest, date, size and tag from tag-list 2021-03-14 10:06:51 +01:00
Joxit
3d4267f5ab feat(riot-v5): add new tag-table tag
Now supports show-content-digest and is-image-remove-activated attributes
2021-03-10 23:32:25 +01:00
Joxit
b3427213d0 feat(riot-v5): start tag-list upgrade with pagination 2021-03-09 21:41:58 +01:00
Joxit
7beac85f25 feat(riot-v5): export docker image class and utils function 2021-03-07 11:24:50 +01:00
Joxit
ea21483346 feat(riot-v5): add config for router and register tag instead of import 2021-03-06 00:58:37 +01:00
Joxit
8fe3adf125 docs: fix read-only-auth example
fixes #175
2021-03-05 18:21:54 +01:00
Joxit
142727e8ac feat(riot-v5): upgrade catalog-element 2021-03-04 22:33:12 +01:00
Joxit
fb80283dd9 feat(riot-v5): upgrade catalog component + Http and fix global style 2021-03-03 00:05:44 +01:00
Joxit
11692c136e feat(riot-v5): create the base of the new UI 2021-03-02 01:15:20 +01:00
Joxit
cde932ec17 feat(riot-v5): create the skeleton for riot5 2021-03-01 23:55:32 +01:00
Joxit
307e171ede chore: fix issue 20 example typo and remove refs to master branch 2021-02-28 22:19:16 +01:00
Joxit
6b012cc8fd fix: add default favicon for the project: X/DNA from my signature.
closes #146
2021-02-14 00:01:52 +01:00
Joxit
887e77f2f1 chore(examples): update electron dependencies 2021-02-11 23:24:38 +01:00
Joxit
5890b723d2 ci(main): fix wrong step order... 2021-02-10 00:02:05 +01:00
Joxit
e947d2251d ci(1.5.3): push latest tag instead of master in releases and remove multi stage build in favor of GH CI
close #169
2021-02-09 23:57:00 +01:00
Joxit
b427e09e84 build: release 1.5.2 with footer fix
fixes: #168
2021-02-02 22:10:15 +01:00
Joxit
476a96279e fix: the footer is no more sticky to the bottom of the page
fixes #159
2020-12-24 22:32:01 +01:00
Joxit
e5b0d5d756 ci: fix error in yaml synthax 2020-12-23 00:14:28 +01:00
Joxit
2337a06db6 ci(release): add github ci for releases 2020-12-22 23:20:12 +01:00
Joxit
8c613701d3 chore: code cleanup 2020-12-05 22:11:59 +01:00
Joxit
1bad64443d refactor: rename *.tag to *.riot and add new FAQ question 2020-12-01 00:34:10 +01:00
Joxit
ef3a9795cf docs: improve documentation (difference between standard and static version)
closes #154
2020-11-25 00:23:01 +01:00
Joxit
99ea6cf1d8 docs: add new example ui as proxy with read-only right 2020-11-01 23:02:16 +01:00
Joxit
ccd349b7d5 build: release 1.5.1 fonts in the project with some docker improvements 2020-10-25 02:05:55 +01:00
Joe Bureau
d87cd44a00 fix(docker): unexpected EOF errors when pulling large images (#152) 2020-10-25 01:21:55 +02:00
Jones Magloire
b8802ef7ab fix(fonts): add Roboto fonts in the project (#151) 2020-10-24 00:12:03 +02:00
Giacomo Mazzamuto
e6c20afcf3 Use entrypoint mechanism from latest nginx images (#150)
This allows the user to execute custom scripts before the server starts.
2020-10-21 23:26:05 +02:00
Joxit
1220825f31 docs: add new question in the FAQ 2020-09-25 23:33:30 +02:00
Joxit
501d0d72a0 chore: update project page theme 2020-08-25 00:32:45 +02:00
Joxit
be813e6617 build: release 1.5.0 supports for multi-arch images 2020-06-21 23:39:05 +02:00
Murad
b4e6369a71 Update values.yaml (#135) 2020-06-12 08:58:15 +02:00
Joxit
c9ede6fe61 fix(multi-arch): wrong history order when we use multi-arch tabs many times
no arch when the landing page is not tag history
reorder history elements
2020-06-11 00:07:08 +02:00
Joxit
656914f0d7 feat(multi-arch): add behaviour on tab change and fill content 2020-06-10 09:18:29 +02:00
Joxit
f8c5010fd1 feat(multi-arch): add header for list and fill history with the first arch 2020-06-09 19:47:09 +02:00
Joxit
42f19fcef7 feat(multi-arch): add tab for multi arch in history page 2020-06-07 22:52:30 +02:00
Joxit
f9620639bf build: release 1.4.9 new options SHOW_CONTENT_DIGEST and CATALOG_ELEMENTS_LIMIT
Improve view for very long tags in taglist
2020-06-01 12:31:48 +02:00
Joxit
d1700ccf74 chore: update README for new option CATALOG_ELEMENTS_LIMIT 2020-05-31 01:19:18 +02:00
Joxit
991eaf932d feat: add content element limit
closes: #127
2020-05-31 01:18:55 +02:00
Joxit
e2ee319d4a chore: update readme for SHOW_CONTENT_DIGEST 2020-05-31 01:07:17 +02:00
Joxit
06d6293e79 feat: reduce the sha hash size when the tag is too long 2020-05-31 01:07:17 +02:00
Joxit
00fe443a7c feat: Hide SHA-Hash column
closes #126
2020-05-31 01:07:17 +02:00
Joxit
6e7fc1508e Add CORS alternative solution in README 2020-05-18 23:08:52 +02:00
Joxit
178cd5a59d chore: move electron to examples folder 2020-05-11 11:13:07 +02:00
Manuel Leitold
da9591609e Add Electron-based Standalone Application (#129)
* add electron app
* add some readme
* add more documentation
* add a password fix for windows
* format code
* overwrite existing dists
* build app first before building electron app
* add authentication
* add build
* use material ui for credentials
* add application bar
* open dev tools only in dev mode
* cleanup code
* disable add button if a new item is added
* do not always create credentials helper - create it once
* improve add button
* do not make credential helper modal
* use dark mode if user prefers it
* disable menubar in credentials window
* clean up package json
* show windows first when all DOMs are loaded
* remove save button
* write documentation
* load credentials after credentials helper is closed
* execute npm install first
* add gif animation for the credential helper
2020-05-11 10:57:10 +02:00
Joxit
f0a40d6087 fix(catalog): indent aggregated entries on large screen was wrong 2020-02-02 15:59:25 +01:00
Joxit
01d8bcfccd feat(footer): reduce footer size 2020-02-02 15:16:47 +01:00
Joxit
c60c2f3e95 feat(catalog): indent aggregated entries differently
resolves #121
2020-02-01 23:45:16 +01:00
Joxit
241ee0fd13 fix(delete): alt+click every time with better messages when no digest
fixes #120
2020-01-28 23:03:08 +01:00
171 changed files with 4116 additions and 2273 deletions

View File

@@ -4,4 +4,5 @@
!nginx
!src
!package.json
!gulpfile.js
!gulpfile.js
!favicon.ico

44
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Build and pus master/main docker images
on:
push:
branches: [ master, main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Build the interface
run: npm run build
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Beta Alpine Version
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
joxit/docker-registry-ui:master
joxit/docker-registry-ui:main
- name: Build and push Beta Debian Version
uses: docker/build-push-action@v2
with:
context: .
file: ./debian.dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
joxit/docker-registry-ui:master-debian
joxit/docker-registry-ui:main-debian

64
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Release
on:
push:
tags: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: npm install
- name: Build the interface
run: npm run build
- name: Current tag
id: current-tag
run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*\.[0-9]*')"
- name: Download kokai
run: curl -sSL https://github.com/Joxit/kokai/releases/download/$(curl -sSL https://api.github.com/repos/Joxit/kokai/releases/latest | jq -r ".tag_name")/kokai-linux-x86_64 > kokai
- name: Create Release Note
run: chmod +x kokai && ./kokai release --ref ${{ github.ref }} --tag-from-ref . > RELEASE_NOTE.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: RELEASE_NOTE.md
draft: false
prerelease: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Latest Version
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
joxit/docker-registry-ui:latest
joxit/docker-registry-ui:${{steps.current-tag.outputs.tag}}
- name: Build and push Latest Debian Version
uses: docker/build-push-action@v2
with:
context: .
file: ./debian.dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
joxit/docker-registry-ui:debian
joxit/docker-registry-ui:${{steps.current-tag.outputs.tag}}-debian

4
.gitignore vendored
View File

@@ -3,4 +3,6 @@ node_modules
package-lock.json
registry-data
.idea
_site
_site
*.orig
.serve/

View File

@@ -11,6 +11,10 @@
- Sébastien Huss [@sebt3](https://github.com/sebt3)
- Vladimir Kozyrev [@fieryvova](https://github.com/fieryvova)
- Haibo Jia [@bluethon](https://github.com/bluethon)
- Manuel Leitold [@agrippa1994](https://github.com/agrippa1994)
- Murad [@muradheydarov](https://github.com/muradheydarov)
- Giacomo Mazzamuto [@gmazzamuto](https://github.com/gmazzamuto)
- Joe Bureau [@jabstone](https://github.com/jabstone)
## Because committers are not the only contributors
@@ -24,6 +28,10 @@
- [@wuyue92tree](https://github.com/wuyue92tree)
- Giovanni Toraldo [@gionn](https://github.com/gionn)
- [@marcusblake](https://github.com/marcusblake)
- Dario [@pidario](https://github.com/pidario)
- Dario Piombo [@pidario](https://github.com/pidario)
- Jernej K. [@Cvetk0](https://github.com/Cvetk0)
- Cristian Posoiu [@cr1st1p](https://github.com/cr1st1p)
- Cristian Posoiu [@cr1st1p](https://github.com/cr1st1p)
- Sepp Zuther [@Herr-Sepp](https://github.com/Herr-Sepp)
- Tomas Hulata [@tombokombo](https://github.com/tombokombo)
- Ben Jackson [@bjj](https://github.com/bjj)
- 三十文 [@xfduan](https://github.com/xfduan)

View File

@@ -12,22 +12,15 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM node:10-alpine AS builder
WORKDIR /usr/app
COPY package.json .
RUN yarn install
COPY . .
RUN yarn build
FROM nginx:alpine
LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
COPY --from=builder /usr/app/dist/ /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -1 +0,0 @@
static.dockerfile

182
README.md
View File

@@ -1,5 +1,5 @@
---
title: Project Page
title: Docker Registry User Interface
---
# Docker Registry UI
@@ -9,20 +9,15 @@ title: Project Page
## Overview
This project aims to provide a simple and complete user interface for your private docker registry.
You have the choice between two versions, the **standard interface** and the **static interface**.
This project aims to provide a simple and complete user interface for your private docker registry. You can customize the interface with various options. The major option is `SINGLE_REGISTRY` which allows you to disable the dynamic selection of docker registeries (same behavior as the old **static** tag).
In the **standard interface**, there is no default registry, you need to add your own within the UI.
You can manage more than one registry server.
All registries will be stored in the [local storage](https://en.wikipedia.org/wiki/Web_storage#Local_and_session_storage) of your browser. No configuration is needed when you launch the UI.
In the **static interface**, it will connect to a single registry and will not change. The configuration is done at the start of the interface, when you use the docker images whose tags contain the `static` keyword.
You may need the [migration guide from 1.x to 2.x](https://github.com/Joxit/docker-registry-ui/wiki/Migrating-from-1.x-to-2.x) or [the 1.x readme](https://github.com/Joxit/docker-registry-ui/blob/8fe3adf12540d1316cb57628ebe86a392a703d90/README.md)
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/main/examples)
![preview](https://raw.github.com/Joxit/docker-registry-ui/master/docker-registry-ui.gif "Preview of Docker Registry UI")
![preview](https://raw.github.com/Joxit/docker-registry-ui/main/docker-registry-ui.gif "Preview of Docker Registry UI")
## Features
@@ -40,15 +35,20 @@ This web user interface uses [Riot](https://github.com/Riot/riot) the react-like
- Display image/tag count (see [#56 issue comment](https://github.com/Joxit/docker-registry-ui/issues/56#issuecomment-449246524)).
- Select multiple tags to delete (see [#29](https://github.com/Joxit/docker-registry-ui/issues/29)).
- Select all tags with ALT + Click to delete (see [#80](https://github.com/Joxit/docker-registry-ui/issues/80)).
- One interface for many registries **standard interface**.
- Share your docker registry with query parameter `url` (e.g. `https://joxit.dev/docker-registry-ui/demo?url=https://registry.example.com`) **standard interface**.
- Use `joxit/docker-registry-ui:static` as reverse proxy (with `REGISTRY_URL` environment variable) to your docker registry (This will avoid CORS) **static interface**.
- Add Title when using `REGISTRY_URL` (see [#28](https://github.com/Joxit/docker-registry-ui/issues/28)) **static interface**.
- Customise docker pull command on static registry UI (see [#71](https://github.com/Joxit/docker-registry-ui/issues/71)) **static interface**.
- Add custom header via environment variable and file via `NGINX_PROXY_HEADER_*` (see [#89](https://github.com/Joxit/docker-registry-ui/pull/89)) **static interface**
- One interface for many registries (when `SINGLE_REGISTRY=false`).
- Share your docker registry with query parameter `url` (e.g. `https://joxit.dev/docker-registry-ui/demo?url=https://registry.example.com`) (when `SINGLE_REGISTRY=false`).
- Use the UI as reverse proxy (with `NGINX_PROXY_PASS_URL` environment variable) to your docker registry (This will avoid CORS).
- Add Title when using `REGISTRY_TITLE` (see [#28](https://github.com/Joxit/docker-registry-ui/issues/28)).
- Customise docker pull command on static registry UI (see [#71](https://github.com/Joxit/docker-registry-ui/issues/71)).
- Add custom header via environment variable and file via `NGINX_PROXY_HEADER_*` (see [#89](https://github.com/Joxit/docker-registry-ui/pull/89))
- Show/Hide content digest in taglist via `SHOW_CONTENT_DIGEST` (values are: [`true`, `false`], default: `true`) (see [#126](https://github.com/Joxit/docker-registry-ui/issues/126)).
- Limit the number of elements in the image list via `CATALOG_ELEMENTS_LIMIT` (see [#127](https://github.com/Joxit/docker-registry-ui/pull/127)).
- Multi arch support in history page (see [#130](https://github.com/Joxit/docker-registry-ui/issues/130) and [#134](https://github.com/Joxit/docker-registry-ui/pull/134))
## FAQ
- What is the difference between **`SINGLE_REGISTRY=false`** and **`SINGLE_REGISTRY=true`** options ?
- When `SINGLE_REGISTRY` is set to false, a menu appears on the interface allowing you to dynamically change docker registry URLs.
- Why, when I delete all tags of an image, the image is still in the UI ?
- This is a limitation of docker registry, the garbage collector don't remove empty images. If you want to delete dangling images, you will need to delete the folder in your registry data. (see [#77](https://github.com/Joxit/docker-registry-ui/issues/77))
- Why the image size in the UI is not the same as displayed during `docker images` ?
@@ -65,106 +65,31 @@ This web user interface uses [Riot](https://github.com/Riot/riot) the react-like
- This fixes the issue [#88](https://github.com/Joxit/docker-registry-ui/issues/88). More about this in [#113](https://github.com/Joxit/docker-registry-ui/issues/113).
- Why DELETE fails with 401 status code (using Basic Auth) ?
- This is caused by a bug in docker registry, I suggest to have your UI on the same domain than your registry e.g. registry.example.com/ui/. (see [#104](https://github.com/Joxit/docker-registry-ui/issues/104)).
- Can I use the docker registry ui as a standalone application (with Electron) ?
- Yes, check out the example [here](https://github.com/Joxit/docker-registry-ui/tree/main/examples/electron). (see [#129](https://github.com/Joxit/docker-registry-ui/pull/129))
- I deleted images through the UI, but they are still present on the server. How can I delete them?
- When you delete an image with the UI, only the reference is deleted and not the content. To remove dangling images, you need to run the garbage collector of the registry with the command `registry garbage-collect config.yml` or `docker exec registry registry garbage-collect config.yml`. (see [#77](https://github.com/Joxit/docker-registry-ui/issues/77) [#147](https://github.com/Joxit/docker-registry-ui/issues/147))
- Why when I delete one tag, all tags with the same SHA are deleted ?
- This a docker registry API limitation, there is only one way to [delete images with tag](https://docs.docker.com/registry/spec/api/#deleting-an-image), it's by its `name` and its `manifest` (it's a sha of the content). So when you delete a tag, this will delete all tags of this image with the same SHA/manifest.
Need more informations ? Try my [examples](https://github.com/Joxit/docker-registry-ui/tree/master/examples) or open an issue.
## Getting Started
Need more informations ? Try my [examples](https://github.com/Joxit/docker-registry-ui/tree/main/examples) or open an issue.
### Basic
## Available options
First you need node and npm in order to download dependencies.
Some env options are available for use this interface for **only one server**.
```sh
git clone https://github.com/Joxit/docker-registry-ui.git
cd docker-registry-ui
npm install
```
- `REGISTRY_URL`: The default url of your docker registry. You may need CORS configuration on your registry. This is usually the domain name or IP of your registry reachable by your computer (e.g `http://registry.example.com`). (default: derived from the hostname of your UI).
- `REGISTRY_TITLE`: Set a custom title for your user interface. (default: value derived from `REGISTRY_URL`).
- `PULL_URL`: Set a custom url when you copy the `docker pull` command. (default: value derived from `REGISTRY_URL`).
- `DELETE_IMAGES`: Set if we can delete images from the UI. (default: `false`)
- `SHOW_CONTENT_DIGEST`: Show content digest in docker tag list. (default: `true`)
- `CATALOG_ELEMENTS_LIMIT`: Limit the number of elements in the catalog page. (default: `100000`).
- `SINGLE_REGISTRY`: Remove the menu that show the dialogs to add, remove and change the endpoint of your docker registry. (default `false`)
- `NGINX_PROXY_PASS_URL`: Update the default Nginx configuration and set the **proxy_pass** to your backend docker registry (this avoid CORS configuration). This is usually the name of your registry container in the form `http://registry:5000`.
- `NGINX_PROXY_HEADER_*`: Update the default Nginx configuration and set **custom headers** for your backend docker registry. Only when `NGINX_PROXY_PASS_URL` is used.
Now you can open index.html with your browser or use a http-server
```sh
npm install -g http-server
http-server
```
### Docker
The docker contains the source code and a node webserver in order to serve the docker-registry-ui.
#### Get the docker image
You can get the image in three ways
From sources with this command:
```sh
git clone https://github.com/Joxit/docker-registry-ui.git
# Alpine
docker build -t joxit/docker-registry-ui:latest docker-registry-ui
docker build -t joxit/docker-registry-ui:static -f docker-registry-ui/static.dockerfile docker-registry-ui
# Debian
docker build -t joxit/docker-registry-ui:debian -f docker-registry-ui/debian.dockerfile docker-registry-ui
docker build -t joxit/docker-registry-ui:static -f docker-registry-ui/debian-static.dockerfile docker-registry-ui
```
Or build with the url:
```sh
# Alpine
docker build -t joxit/docker-registry-ui:latest github.com/Joxit/docker-registry-ui
docker build -t joxit/docker-registry-ui:static -f static.dockerfile github.com/Joxit/docker-registry-ui
# Debian
docker build -t joxit/docker-registry-ui:debian -f debian.dockerfile github.com/Joxit/docker-registry-ui
docker build -t joxit/docker-registry-ui:debian-static -f debian-static.dockerfile github.com/Joxit/docker-registry-ui
```
Or pull the image from [docker hub](https://hub.docker.com/r/joxit/docker-registry-ui/):
```sh
# Alpine
docker pull joxit/docker-registry-ui:latest
docker pull joxit/docker-registry-ui:static
# Debian
docker pull joxit/docker-registry-ui:debian
docker pull joxit/docker-registry-ui:debian-static
```
#### Run the docker
To run the docker and see the website on your 80 port, try this:
```sh
docker run -d -p 80:80 joxit/docker-registry-ui
```
#### Run the static interface
Some env options are available for use this interface for only one server.
- [`URL`](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-standalone): set the static URL to use (You will need CORS configuration). Example: `http://127.0.0.1:5000`. (`Required`)
- [`REGISTRY_URL`](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-proxy): your docker registry URL to contact (CORS configuration is not needed). Example: `http://my-docker-container:5000`. (Can't be used with `URL`, since 0.3.2).
- `DELETE_IMAGES`: if this variable is empty or `false`, delete feature is deactivated. It is activated otherwise.
- `REGISTRY_TITLE`: Set a custom title for your user interface when using `REGISTRY_URL` (since 0.3.4).
- `PULL_URL`: Set a custom url for the docker pull command, this is useful when you use `REGISTRY_URL` and your registry is on a different host (since 1.1.0).
- [`NGINX_PROXY_HEADER_*`](https://github.com/Joxit/docker-registry-ui/tree/master/examples/proxy-headers): Set custom headers for your docker registry, usefull when you want to add your credentials. (Can be use only with `REGISTRY_URL`).
Example with `URL` option.
```sh
docker run -d -p 80:80 -e URL=http://127.0.0.1:5000 -e DELETE_IMAGES=true joxit/docker-registry-ui:static
```
Example with `REGISTRY_URL`, this will add a proxy to your registry.
Your registry will be accessible here : `http://127.0.0.1/v2`, this will avoid CORS errors (see [#25](https://github.com/Joxit/docker-registry-ui/issues/25#issuecomment-360522487)).
Be careful, `joxit/docker-registry-ui` and `registry:2` will communicate, both containers should be in the same network or use your private IP.
```sh
docker network create registry-ui-net
docker run -d --net registry-ui-net --name registry-srv registry:2
docker run -d --net registry-ui-net -p 80:80 -e REGISTRY_URL=http://registry-srv:5000 -e DELETE_IMAGES=true -e REGISTRY_TITLE="My registry" joxit/docker-registry-ui:static
```
There are some examples with [docker-compose](https://docs.docker.com/compose/) and docker-registry-ui as proxy [here](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-proxy/) or docker-registry-ui as standalone [here](https://github.com/Joxit/docker-registry-ui/tree/master/examples/ui-as-standalone/).
There are some examples with [docker-compose](https://docs.docker.com/compose/) and docker-registry-ui as proxy [here](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-proxy/) or docker-registry-ui as standalone [here](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-standalone/).
## Using CORS
@@ -174,16 +99,19 @@ If your docker registry does not need credentials, you will need to send this HE
Access-Control-Allow-Origin: ['*']
If your docker registry need credentials, you will need to send these HEADERS:
If your docker registry need credentials, you will need to send these HEADERS (you must add the protocol `http`/`https` and the port when not default `80`/`443`):
```yml
http:
headers:
Access-Control-Allow-Origin: ['<your docker-registry-ui url>']
Access-Control-Allow-Origin: ['http://registry.example.com']
Access-Control-Allow-Credentials: [true]
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS'] # Optional
```
An alternative for CORS issues is a plugin on your browser, more info [here](https://github.com/Joxit/docker-registry-ui/issues/25#issuecomment-621104846) (thank you [xmontero](https://github.com/xmontero)).
## Using delete
For deleting images, you need to activate the delete feature in your registry:
@@ -203,6 +131,8 @@ http:
Access-Control-Expose-Headers: ['Docker-Content-Digest']
```
If you are running the **static interface** don't forget the environment variable `DELETE_IMAGES`.
## Registry example
Example of docker registry configuration file:
@@ -223,9 +153,9 @@ http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://127.0.0.1:8001']
Access-Control-Allow-Origin: ['http://127.0.0.1:8000']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']
@@ -235,14 +165,20 @@ auth:
path: /etc/docker/registry/htpasswd
```
## Standalone Application
If you do not want to install the docker-registry-ui on your server, you may
check out the [Electron](examples/electron/README.md) standalone application.
## All examples
- [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/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))
- [Use docker-registry-ui as a proxy (use REGISTRY_URL)](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-proxy)
- [Use docker-registry-ui as standalone (use URL)](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-standalone)
- [Use docker-registry-ui with traefik](https://github.com/Joxit/docker-registry-ui/tree/main/examples/traefik)
- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/main/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/main/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/main/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/main/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/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))

View File

@@ -2,10 +2,12 @@ title: Docker Registry User Interface
description: The simplest and most complete UI for your private registry!
url: https://joxit.dev/docker-registry-ui
google_analytics: UA-99119327-1
theme: jekyll-theme-cayman
remote_theme: joxit/joxit.github.io
author: Jones Magloire
twitter:
username: Joxit
instagram:
username: jox.it
defaults:
- scope:
path: ""

View File

@@ -1,28 +0,0 @@
# Copyright (C) 2016-2018 Jones Magloire @Joxit
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM arm32v7/nginx
LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY dist/ /usr/share/nginx/html/
COPY dist/scripts/docker-registry-ui-static.js /usr/share/nginx/html/scripts/docker-registry-ui.js
COPY bin/entrypoint /bin
ENTRYPOINT entrypoint

View File

@@ -18,4 +18,9 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -1,28 +0,0 @@
# Copyright (C) 2016-2018 Jones Magloire @Joxit
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM arm64v8/nginx
LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY dist/ /usr/share/nginx/html/
COPY dist/scripts/docker-registry-ui-static.js /usr/share/nginx/html/scripts/docker-registry-ui.js
COPY bin/entrypoint /bin
ENTRYPOINT entrypoint

View File

@@ -18,4 +18,9 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -1,11 +1,16 @@
#!/bin/sh
sed -i "s,\${URL},${URL}," scripts/docker-registry-ui.js
sed -i "s,\${REGISTRY_TITLE},${REGISTRY_TITLE}," scripts/docker-registry-ui.js
sed -i "s,\${PULL_URL},${PULL_URL}," scripts/docker-registry-ui.js
sed -i "s,\${REGISTRY_URL},${REGISTRY_URL}," index.html
sed -i "s,\${REGISTRY_TITLE},${REGISTRY_TITLE}," index.html
sed -i "s,\${PULL_URL},${PULL_URL}," index.html
sed -i "s,\${SINGLE_REGISTRY},${SINGLE_REGISTRY}," index.html
sed -i "s/\${CATALOG_ELEMENTS_LIMIT}/${CATALOG_ELEMENTS_LIMIT}/" index.html
sed -i "s/\${SHOW_CONTENT_DIGEST}/${SHOW_CONTENT_DIGEST}/" index.html
if [ -z "${DELETE_IMAGES}" ] || [ "${DELETE_IMAGES}" = false ] ; then
sed -i -r "s/(isImageRemoveActivated[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
sed -i "s/\${DELETE_IMAGES}/false/" index.html
else
sed -i "s/\${DELETE_IMAGES}/true/" index.html
fi
get_nginx_proxy_headers() {
@@ -25,14 +30,8 @@ get_nginx_proxy_headers() {
done
}
if [ -n "${REGISTRY_URL}" ] ; then
sed -i "s,\${REGISTRY_URL},${REGISTRY_URL}," /etc/nginx/conf.d/default.conf
if [ -n "${NGINX_PROXY_PASS_URL}" ] ; then
sed -i "s,\${NGINX_PROXY_PASS_URL},${NGINX_PROXY_PASS_URL}," /etc/nginx/conf.d/default.conf
sed -i "s^\${NGINX_PROXY_HEADERS}^$(get_nginx_proxy_headers)^" /etc/nginx/conf.d/default.conf
sed -i "s,#!,," /etc/nginx/conf.d/default.conf
fi
if [ -z "$@" ]; then
exec nginx -g "daemon off;"
else
exec $@
fi

View File

@@ -6,8 +6,16 @@ for i in alpine chronograf:alpine consul debian jawg/mapnik3 nginx:alpine postgr
docker push 127.0.0.1:5000/$i
done
for i in arm32v7-static 1.2-debian-static master-static 1.2 arm64v8 arm32v7 arm64v8-static master 1.2-debian latest static debian-static debian 1.2-static 1.1 1.1-static 1.1-debian-static 1.1-debian ; do
for i in arm64v8 arm32v7 master latest debian main; do
docker pull joxit/docker-registry-ui:$i
docker tag joxit/docker-registry-ui:$i 127.0.0.1:5000/joxit/docker-registry-ui:$i
docker push 127.0.0.1:5000/joxit/docker-registry-ui:$i
done
for v in 1.1 1.2 1.3 1.4 1.5 2.0 ; do
for type in "-debian" ""; do
docker pull joxit/docker-registry-ui:$v$type
docker tag joxit/docker-registry-ui:$v$type 127.0.0.1:5000/joxit/docker-registry-ui:$v$type
docker push 127.0.0.1:5000/joxit/docker-registry-ui:$v$type
done
done

View File

@@ -1,28 +0,0 @@
# Copyright (C) 2016-2018 Jones Magloire @Joxit
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM nginx:latest
LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY dist/ /usr/share/nginx/html/
COPY dist/scripts/docker-registry-ui-static.js /usr/share/nginx/html/scripts/docker-registry-ui.js
COPY bin/entrypoint /bin
ENTRYPOINT entrypoint

View File

@@ -18,4 +18,9 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
ENV NGINX_PROXY_HEADER_Host '$http_host'
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -19,13 +19,13 @@
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../dist/vendor.css">
<link rel="stylesheet" href="../dist/style.css">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../dist/docker-registry-ui.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:locale" content="en_US" />
<meta name="description" content="This is the live demo for Docker Registry User Interface. Try it now! Sources : https://github.com/Joxit/docker-registry-ui" />
<meta property="og:description" content="This is the live demo for Docker Registry User Interface. Try it now! Sources : https://github.com/Joxit/docker-registry-ui" />
<meta name="description"
content="This is the live demo for Docker Registry User Interface. Try it now! Sources : https://github.com/Joxit/docker-registry-ui" />
<meta property="og:description"
content="This is the live demo for Docker Registry User Interface. Try it now! Sources : https://github.com/Joxit/docker-registry-ui" />
<link rel="canonical" href="https://joxit.dev/docker-registry-ui/demo/" />
<meta property="og:url" content="https://joxit.dev/docker-registry-ui/demo/" />
<meta property="og:site_name" content="Live Demo | Docker Registry User Interface" />
@@ -36,26 +36,20 @@
</head>
<body>
<app></app>
<docker-registry-ui registry-url="" name="Demo Docker Registry UI" pull-url="" show-content-digest="true"
is-image-remove-activated="true" catalog-elements-limit="1000" single-registry="false">
<script>
if (!localStorage.getItem('registryServer')) {
localStorage.setItem('registryServer', JSON.stringify([
'https://raw.githubusercontent.com/Joxit/docker-registry-ui/master/demo'
]))
}
</script>
<script src="../dist/docker-registry-ui.js"></script>
<script>
if ((function() {
try {
const res = JSON.parse(localStorage.getItem('registryServer'));
if (!(res instanceof Array) || res.length == 0) {
return true;
}
} catch (e) { return true; }
})()) {
localStorage.setItem('registryServer', JSON.stringify(['https://raw.githubusercontent.com/Joxit/docker-registry-ui/master/demo']))
}
</script>
<script src="../dist/scripts/vendor.js"></script>
<script src="../dist/scripts/docker-registry-ui.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),

1
dist/docker-registry-ui.css vendored Normal file

File diff suppressed because one or more lines are too long

20
dist/docker-registry-ui.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
dist/fonts/Roboto-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Light.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Light.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Light.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Regular.eot vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/Roboto-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/RobotoMono-Regular.eot vendored Normal file

Binary file not shown.

BIN
dist/fonts/RobotoMono-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/RobotoMono-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/RobotoMono-Regular.woff2 vendored Normal file

Binary file not shown.

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2" x="0px" y="0px" viewBox="-5.724 -43.601 730 600" fill="#777"><path d="m595.942,422.343 c -7.543,0.119 -13.562,6.331 -13.443,13.875 0.119,7.544 6.332,13.562 13.875,13.443 7.495,-0.118 13.494,-6.254 13.445,-13.75 -0.085,-7.578 -6.297,-13.652 -13.875,-13.568 0,0 -10e-4,0 0,0 m 0,24.398 c -5.975,0.272 -11.039,-4.352 -11.311,-10.326 -0.271,-5.976 4.352,-11.04 10.327,-11.312 5.975,-0.271 11.039,4.352 11.311,10.327 0.01,0.19 0.013,0.382 0.011,0.573 0.204,5.723 -4.27,10.527 -9.992,10.731 -0.115,0.005 -0.23,0.007 -0.346,0.007"/><path d="m599.081,436.342 v -0.185 c 1.512,-0.292 2.65,-1.544 2.8,-3.076 0.057,-1.175 -0.432,-2.311 -1.323,-3.077 -1.445,-0.765 -3.076,-1.106 -4.707,-0.984 -1.743,-0.024 -3.484,0.12 -5.2,0.431 v 13.538 h 3.077 v -5.446 h 1.477 c 1.754,0 2.554,0.646 2.83,2.154 0.184,1.143 0.536,2.252 1.047,3.292 h 3.415 c -0.53,-1.062 -0.873,-2.207 -1.016,-3.385 -0.138,-1.473 -1.088,-2.744 -2.462,-3.292 m -3.723,-0.985 h -1.508 v -3.908 c 0.583,-0.069 1.172,-0.069 1.754,0 1.97,0 2.893,0.831 2.893,2.062 0,1.231 -1.415,2 -3.076,2"/><path d="M707.494,193.557c-1.938-1.539-20.029-15.199-58.181-15.199c-10.074,0.044-20.127,0.908-30.061,2.584 c-7.384-50.612-49.228-75.288-51.104-76.395l-10.245-5.908l-6.738,9.723c-8.438,13.061-14.598,27.459-18.214,42.582 c-6.831,28.891-2.677,56.027,11.999,79.226c-17.722,9.876-46.151,12.307-51.904,12.522H22.367 c-12.294,0.017-22.27,9.952-22.337,22.245c-0.549,41.234,6.437,82.222,20.614,120.946c16.214,42.521,40.336,73.842,71.719,93.01 c35.167,21.537,92.302,33.844,157.067,33.844c29.258,0.092,58.461-2.556,87.226-7.907c39.986-7.342,78.463-21.318,113.839-41.352 c29.149-16.88,55.383-38.354,77.688-63.596c37.29-42.213,59.505-89.226,76.026-131.007c2.215,0,4.431,0,6.584,0 c40.828,0,65.935-16.338,79.78-30.029c9.201-8.732,16.384-19.369,21.045-31.167l2.923-8.553L707.494,193.557z"/><path d="M65.995,228.909h63.073c3.042,0,5.507-2.466,5.507-5.507l0,0V167.22c0.017-3.042-2.435-5.521-5.476-5.538 c-0.01,0-0.021,0-0.031,0H65.995c-3.042,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181 C60.488,226.443,62.953,228.909,65.995,228.909L65.995,228.909"/><path d="M152.913,228.909h63.073c3.042,0,5.507-2.466,5.507-5.507l0,0V167.22c0.017-3.042-2.435-5.521-5.477-5.538 c-0.01,0-0.021,0-0.031,0h-63.073c-3.059,0-5.538,2.479-5.538,5.538v56.181C147.392,226.448,149.866,228.909,152.913,228.909"/><path d="M241.153,228.909h63.073c3.042,0,5.507-2.466,5.507-5.507l0,0V167.22c0.017-3.042-2.435-5.521-5.477-5.538 c-0.01,0-0.021,0-0.031,0h-63.073c-3.042,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181 C235.646,226.443,238.112,228.909,241.153,228.909L241.153,228.909"/><path d="M328.348,228.909h63.073c3.047,0,5.521-2.46,5.538-5.507V167.22c0-3.059-2.479-5.538-5.538-5.538l0,0h-63.073 c-3.042,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181C322.841,226.443,325.307,228.909,328.348,228.909L328.348,228.909"/><path d="M152.913,148.083h63.073c3.046-0.017,5.507-2.492,5.507-5.538V86.364c0-3.042-2.466-5.507-5.507-5.507l0,0h-63.073 c-3.046,0-5.521,2.46-5.538,5.507v56.181C147.392,145.597,149.861,148.066,152.913,148.083"/><path d="M241.153,148.083h63.073c3.046-0.017,5.507-2.492,5.507-5.538V86.364c0-3.042-2.466-5.507-5.507-5.507l0,0h-63.073 c-3.042,0-5.507,2.466-5.507,5.507l0,0v56.181C235.646,145.591,238.107,148.066,241.153,148.083"/><path d="M328.348,148.083h63.073c3.052-0.017,5.521-2.486,5.538-5.538V86.364c-0.017-3.047-2.491-5.507-5.538-5.507h-63.073 c-3.042,0-5.507,2.466-5.507,5.507l0,0v56.181C322.841,145.591,325.302,148.066,328.348,148.083"/><path d="M328.348,67.227h63.073c3.047,0,5.521-2.461,5.538-5.507V5.507C396.942,2.46,394.468,0,391.421,0h-63.073 c-3.042,0-5.507,2.465-5.507,5.507l0,0v56.212C322.841,64.761,325.307,67.227,328.348,67.227"/><path d="M416.312,228.909h63.073c3.047,0,5.521-2.46,5.538-5.507V167.22c0-3.059-2.479-5.538-5.538-5.538l0,0h-63.073 c-3.041,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181C410.805,226.443,413.271,228.909,416.312,228.909"/></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2" x="0px" y="0px" viewBox="-5.724 -43.601 730 600" fill="#777"> <path d="m595.942,422.343 c -7.543,0.119 -13.562,6.331 -13.443,13.875 0.119,7.544 6.332,13.562 13.875,13.443 7.495,-0.118 13.494,-6.254 13.445,-13.75 -0.085,-7.578 -6.297,-13.652 -13.875,-13.568 0,0 -10e-4,0 0,0 m 0,24.398 c -5.975,0.272 -11.039,-4.352 -11.311,-10.326 -0.271,-5.976 4.352,-11.04 10.327,-11.312 5.975,-0.271 11.039,4.352 11.311,10.327 0.01,0.19 0.013,0.382 0.011,0.573 0.204,5.723 -4.27,10.527 -9.992,10.731 -0.115,0.005 -0.23,0.007 -0.346,0.007"/> <path d="m599.081,436.342 v -0.185 c 1.512,-0.292 2.65,-1.544 2.8,-3.076 0.057,-1.175 -0.432,-2.311 -1.323,-3.077 -1.445,-0.765 -3.076,-1.106 -4.707,-0.984 -1.743,-0.024 -3.484,0.12 -5.2,0.431 v 13.538 h 3.077 v -5.446 h 1.477 c 1.754,0 2.554,0.646 2.83,2.154 0.184,1.143 0.536,2.252 1.047,3.292 h 3.415 c -0.53,-1.062 -0.873,-2.207 -1.016,-3.385 -0.138,-1.473 -1.088,-2.744 -2.462,-3.292 m -3.723,-0.985 h -1.508 v -3.908 c 0.583,-0.069 1.172,-0.069 1.754,0 1.97,0 2.893,0.831 2.893,2.062 0,1.231 -1.415,2 -3.076,2"/> <path d="M707.494,193.557c-1.938-1.539-20.029-15.199-58.181-15.199c-10.074,0.044-20.127,0.908-30.061,2.584 c-7.384-50.612-49.228-75.288-51.104-76.395l-10.245-5.908l-6.738,9.723c-8.438,13.061-14.598,27.459-18.214,42.582 c-6.831,28.891-2.677,56.027,11.999,79.226c-17.722,9.876-46.151,12.307-51.904,12.522H22.367 c-12.294,0.017-22.27,9.952-22.337,22.245c-0.549,41.234,6.437,82.222,20.614,120.946c16.214,42.521,40.336,73.842,71.719,93.01 c35.167,21.537,92.302,33.844,157.067,33.844c29.258,0.092,58.461-2.556,87.226-7.907c39.986-7.342,78.463-21.318,113.839-41.352 c29.149-16.88,55.383-38.354,77.688-63.596c37.29-42.213,59.505-89.226,76.026-131.007c2.215,0,4.431,0,6.584,0 c40.828,0,65.935-16.338,79.78-30.029c9.201-8.732,16.384-19.369,21.045-31.167l2.923-8.553L707.494,193.557z"/> <path d="M65.995,228.909h63.073c3.042,0,5.507-2.466,5.507-5.507l0,0V167.22c0.017-3.042-2.435-5.521-5.476-5.538 c-0.01,0-0.021,0-0.031,0H65.995c-3.042,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181 C60.488,226.443,62.953,228.909,65.995,228.909L65.995,228.909"/> <path d="M152.913,228.909h63.073c3.042,0,5.507-2.466,5.507-5.507l0,0V167.22c0.017-3.042-2.435-5.521-5.477-5.538 c-0.01,0-0.021,0-0.031,0h-63.073c-3.059,0-5.538,2.479-5.538,5.538v56.181C147.392,226.448,149.866,228.909,152.913,228.909"/> <path d="M241.153,228.909h63.073c3.042,0,5.507-2.466,5.507-5.507l0,0V167.22c0.017-3.042-2.435-5.521-5.477-5.538 c-0.01,0-0.021,0-0.031,0h-63.073c-3.042,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181 C235.646,226.443,238.112,228.909,241.153,228.909L241.153,228.909"/> <path d="M328.348,228.909h63.073c3.047,0,5.521-2.46,5.538-5.507V167.22c0-3.059-2.479-5.538-5.538-5.538l0,0h-63.073 c-3.042,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181C322.841,226.443,325.307,228.909,328.348,228.909L328.348,228.909"/> <path d="M152.913,148.083h63.073c3.046-0.017,5.507-2.492,5.507-5.538V86.364c0-3.042-2.466-5.507-5.507-5.507l0,0h-63.073 c-3.046,0-5.521,2.46-5.538,5.507v56.181C147.392,145.597,149.861,148.066,152.913,148.083"/> <path d="M241.153,148.083h63.073c3.046-0.017,5.507-2.492,5.507-5.538V86.364c0-3.042-2.466-5.507-5.507-5.507l0,0h-63.073 c-3.042,0-5.507,2.466-5.507,5.507l0,0v56.181C235.646,145.591,238.107,148.066,241.153,148.083"/> <path d="M328.348,148.083h63.073c3.052-0.017,5.521-2.486,5.538-5.538V86.364c-0.017-3.047-2.491-5.507-5.538-5.507h-63.073 c-3.042,0-5.507,2.466-5.507,5.507l0,0v56.181C322.841,145.591,325.302,148.066,328.348,148.083"/> <path d="M328.348,67.227h63.073c3.047,0,5.521-2.461,5.538-5.507V5.507C396.942,2.46,394.468,0,391.421,0h-63.073 c-3.042,0-5.507,2.465-5.507,5.507l0,0v56.212C322.841,64.761,325.307,67.227,328.348,67.227"/> <path d="M416.312,228.909h63.073c3.047,0,5.521-2.46,5.538-5.507V167.22c0-3.059-2.479-5.538-5.538-5.538l0,0h-63.073 c-3.041,0-5.507,2.466-5.507,5.507c0,0.01,0,0.021,0,0.031v56.181C410.805,226.443,413.271,228.909,416.312,228.909"/> </svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

6
dist/index.html vendored
View File

@@ -1,5 +1,5 @@
<!--
Copyright (C) 2016-2019 Jones Magloire @Joxit
Copyright (C) 2016-2021 Jones Magloire @Joxit
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@@ -13,4 +13,6 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--><!DOCTYPE html><html><head><meta charset="UTF-8"><link rel="stylesheet" href="vendor.css"><link rel="stylesheet" href="style.css"><link href="https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,700&display=swap" rel="stylesheet"><meta name="viewport" content="width=device-width,initial-scale=1"><meta property="og:site_name" content="Docker Registry UI"><meta name="twitter:card" content="summary"><meta name="twitter:site" content="@Joxit"><meta name="twitter:creator" content="@Jones Magloire"><title>Docker Registry UI</title></head><body><app></app><script src="scripts/vendor.js"></script><script src="scripts/docker-registry-ui.js"></script></body></html>
--><!DOCTYPE html><html><head><meta charset="UTF-8"><link href="docker-registry-ui.css" rel="stylesheet" type="text/css"><meta name="viewport" content="width=device-width, initial-scale=1"><meta property="og:site_name" content="Docker Registry UI" /><meta name="twitter:card" content="summary" /><meta name="twitter:site" content="@Joxit" /><meta name="twitter:creator" content="@Jones Magloire" /><title>Docker Registry UI</title></head><body><docker-registry-ui registry-url="${REGISTRY_URL}" name="${REGISTRY_TITLE}" pull-url="${PULL_URL}"
show-content-digest="${SHOW_CONTENT_DIGEST}" is-image-remove-activated="${DELETE_IMAGES}"
catalog-elements-limit="${CATALOG_ELEMENTS_LIMIT}" single-registry="${SINGLE_REGISTRY}"></docker-registry-ui><script src="docker-registry-ui.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

18
dist/style.css vendored

File diff suppressed because one or more lines are too long

1
dist/vendor.css vendored

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -1,11 +1,13 @@
## Examples
- [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/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))
- [Use docker-registry-ui as a proxy (use REGISTRY_URL)](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-proxy)
- [Use docker-registry-ui as standalone (use URL)](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-standalone)
- [Use docker-registry-ui with traefik](https://github.com/Joxit/docker-registry-ui/tree/main/examples/traefik)
- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/main/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/main/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/main/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/main/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/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))

8
examples/electron/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# NPM renames .gitignore to .npmignore
# In order to prevent that, we remove the initial "."
# And the CLI then renames it
dist/
node_modules/
Registry*
.cache

View File

@@ -0,0 +1,57 @@
# Standalone Application
## Overview
This standalone application is based on Electron which encapsulates the whole
docker-registry-ui in a single executable, that can be run on your local
computer.
## Building
* Check out or download the repository, open a terminal at the checkout
directory, download the dependencies and build the web app:
```bash
npm install
npm run build
```
* After building the web application, navigate to the ```electron``` directory
and execute following commands to build the executable:
```bash
cd electron
npm install
npm run dist
```
If you encounter any issues, please check the troubleshooting below.
## Password Protected Registries
If you want to interact with password protected Docker Registries, this
application will use the keystore of your system to gather the credentials for
accessing the Registry.
This is accomplished with the [keytar](https://www.npmjs.com/package/keytar)
package. In concjunction with keytar, the integrated credential
helper supports you with managing the credentials to the Registries.
![alt Authentication on macOS](./doc/assets/authentication.gif)
## Troubleshooting
* Problem: The application does not start with ```npm start``` and exits with following message:
```
[7742:0509/001117.199224:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that ./node_modules/electron dist/chrome-sandbox is owned by root and has mode 4755.
```
Solution: Add proper rights to the chrome-sanbox
```bash
sudo chown root ./node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 ./node_modules/electron/dist/chrome-sandbox
```
* Problem: I am on Linux and to not have any password wallet for keytar.
Solution: Install following dependencies according to the official [setup instructions](https://atom.github.io/node-keytar/) for keytar on Linux:
* Debian/Ubuntu: ```sudo apt-get install libsecret-1-dev```
* Red Hat-based: ```sudo yum install libsecret-devel```
* Arch Linux: ```sudo pacman -S libsecret```

View File

@@ -0,0 +1,8 @@
<html>
<body>
<div id="root"></div>
<script src="index.tsx"></script>
</body>
</html>

View File

@@ -0,0 +1,211 @@
import * as React from "react";
import {useEffect, useState} from "react";
import {render} from "react-dom";
import * as keytar from 'keytar';
import {ipcRenderer} from 'electron';
import {
Button,
createMuiTheme,
CssBaseline,
IconButton,
LinearProgress,
makeStyles,
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
TextField,
ThemeProvider,
useMediaQuery
} from "@material-ui/core";
import {Alert, AlertTitle} from '@material-ui/lab';
import {blue} from "@material-ui/core/colors";
import {Add as AddIcon, Delete as DeleteIcon, Save as SaveIcon} from "@material-ui/icons";
const mainStyle = makeStyles((theme) => ({
root: {
padding: theme.spacing(2),
display: "flex",
flexDirection: 'column',
width: '100%',
height: '100%',
},
main: {
flexGrow: 1,
paddingTop: theme.spacing(2),
paddingBottom: theme.spacing(2),
},
input: {
width: '100%',
},
}));
function CredentialRow({credential, index, onDelete, onUpdate}) {
const [account, setAccount] = useState(credential?.account || '');
const [password, setPassword] = useState(credential?.password || '');
const style = mainStyle();
return (<TableRow>
<TableCell>
<TextField
className={style.input}
type="text"
placeholder='https://user@someregistry:5000/'
value={account} variant="outlined"
onChange={(e) => {
setAccount(e.target.value)
}}/>
</TableCell>
<TableCell>
<TextField type="password"
className={style.input}
variant="outlined"
placeholder='Password'
value={password}
onChange={(e) => {
setPassword(e.target.value)
}}/>
</TableCell>
<TableCell align="right">
<IconButton onClick={async () => await onUpdate(credential, index, {account, password})}>
<SaveIcon/>
</IconButton>
<IconButton onClick={async () => await onDelete(credential, index,)}>
<DeleteIcon/>
</IconButton>
</TableCell>
</TableRow>);
}
function CredentialsTable({onError}) {
const [credentials, setCredentials] = useState(null);
async function loadItems() {
try {
const credentials = await keytar.findCredentials('docker-registry-ui');
for (const credential of credentials) {
// fix for windows
credential.password = credential.password.replace(/\000+/g, '');
}
setCredentials(credentials);
} catch (e) {
onError(e.toString());
}
}
async function handleDelete(item, index) {
// delete an item that has not been stored yet
if (!item) {
const newCredentials = [...credentials];
newCredentials.splice(index, 1);
setCredentials(newCredentials);
return;
}
try {
await keytar.deletePassword('docker-registry-ui', item.account);
await loadItems();
} catch (e) {
onError(e.toString());
}
}
async function handleUpdate(oldCredentials, index, newCredentials) {
try {
await handleDelete(oldCredentials, index);
await keytar.setPassword('docker-registry-ui', newCredentials.account, newCredentials.password);
await loadItems();
} catch (e) {
console.error("Error while updating key: ", e);
onError(e.toString());
}
}
useEffect(() => {
const load = async () => {
await loadItems();
};
load();
return;
}, []);
if (credentials === null) {
return <LinearProgress/>
}
return (
<TableContainer component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell>Host of the registry including username</TableCell>
<TableCell>Password</TableCell>
<TableCell align='right'>
<IconButton onClick={() => {
setCredentials([...credentials, null])
}} disabled={credentials.includes(null)}>
<AddIcon/>
</IconButton>
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{credentials.map((credential, index) => <CredentialRow
onDelete={handleDelete}
onUpdate={handleUpdate}
index={index}
key={credential?.account || ''}
credential={credential}/>)}
</TableBody>
</Table>
</TableContainer>
);
}
function App() {
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
const [error, setError] = useState();
const classes = mainStyle();
const theme = React.useMemo(
() =>
createMuiTheme({
palette: {
type: prefersDarkMode ? 'dark' : 'light',
primary: blue,
},
}),
[prefersDarkMode],
);
return (
<ThemeProvider theme={theme}>
<CssBaseline/>
<div className={classes.root}>
{error && <Alert severity='error' onClose={() => {
setError(null)
}}>
<AlertTitle>Error</AlertTitle>
{error}
</Alert>}
<main className={classes.main}>
<CredentialsTable onError={setError}/>
</main>
</div>
</ThemeProvider>
);
}
render(<App/>, document.getElementById("root"));
// @ts-ignore
if (module.hot) {
// @ts-ignore
module.hot.accept();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

229
examples/electron/index.js Normal file
View File

@@ -0,0 +1,229 @@
const {app, BrowserWindow, globalShortcut, Menu} = require('electron');
const isDevMode = require('electron-is-dev');
const keytar = require('keytar');
const url = require('url');
const isMac = process.platform === 'darwin'
// Place holders for our windows so they don't get garbage collected.
let mainWindow = null;
// Credentials that are fetched from the Keychain
let credentials = [];
// Credentials helper window
let credentialsWindow;
const template = [
// { role: 'appMenu' }
...(isMac ? [{
label: app.name,
submenu: [
{role: 'about'},
{type: 'separator'},
{
label: 'Preferences', accelerator: 'CmdorCtrl+,', click: () => {
credentialsWindow.show();
}
},
{type: 'separator'},
{role: 'hide'},
{role: 'hideothers'},
{role: 'unhide'},
{type: 'separator'},
{role: 'quit'}
]
}] : []),
// { role: 'fileMenu' }
{
label: 'File',
submenu: [
...(isMac ? [] : [{role: 'quit'}]),
{
label: 'Preferences', accelerator: 'CmdorCtrl+,', click: () => {
credentialsWindow.show();
}
},
]
},
// { role: 'editMenu' }
{
label: 'Edit',
submenu: [
{role: 'undo'},
{role: 'redo'},
{type: 'separator'},
{role: 'cut'},
{role: 'copy'},
{role: 'paste'},
...(isMac ? [
{role: 'pasteAndMatchStyle'},
{role: 'delete'},
{role: 'selectAll'},
{type: 'separator'},
{
label: 'Speech',
submenu: [
{role: 'startspeaking'},
{role: 'stopspeaking'}
]
}
] : [
{role: 'delete'},
{type: 'separator'},
{role: 'selectAll'}
])
]
},
// { role: 'viewMenu' }
{
label: 'View',
submenu: [
{role: 'reload'},
{role: 'forcereload'},
{role: 'toggledevtools'},
{type: 'separator'},
{role: 'resetzoom'},
{role: 'zoomin'},
{role: 'zoomout'},
{type: 'separator'},
{role: 'togglefullscreen'},
{type: 'separator'},
{
label: 'Credentials Helper', accelerator: 'CmdorCtrl+k', click: () => {
credentialsWindow.show();
}
},
]
},
// { role: 'windowMenu' }
{
label: 'Window',
submenu: [
{role: 'minimize'},
{role: 'zoom'},
...(isMac ? [
{type: 'separator'},
{role: 'front'},
{type: 'separator'},
{role: 'window'}
] : [
{role: 'close'}
])
]
},
{
role: 'help',
submenu: [
{
label: 'Learn More',
click: async () => {
const {shell} = require('electron')
await shell.openExternal('https://joxit.dev/docker-registry-ui/')
}
}
]
}
];
const menu = Menu.buildFromTemplate(template);
if (isMac) {
Menu.setApplicationMenu(menu);
}
async function loadCredentials() {
try {
credentials = await keytar.findCredentials('docker-registry-ui');
for (const credential of credentials) {
// fix for windows
credential.password = credential.password.replace(/\000+/g, '');
}
} catch (e) {
console.log(e);
credentials = [];
}
}
async function createWindow() {
return new Promise((resolve, reject) => {
mainWindow = new BrowserWindow({
height: 920,
width: 1600,
show: false,
webPreferences: {
nodeIntegration: false,
}
});
if (isDevMode) {
mainWindow.webContents.openDevTools();
}
if (!isMac) {
mainWindow.setMenu(menu);
}
mainWindow.loadURL(`file://${__dirname}/dist/index.html`);
mainWindow.webContents.on('dom-ready', () => {
console.log("Main Window DOM ready");
resolve();
});
});
}
async function createCredentialsWindow() {
return new Promise((resolve) => {
credentialsWindow = new BrowserWindow({
width: 1000,
height: 400,
show: false,
title: 'Credential Manager',
parent: mainWindow,
webPreferences: {
nodeIntegration: true,
}
});
if (isDevMode) {
credentialsWindow.openDevTools();
}
if (!isMac) {
credentialsWindow.setMenu(null);
}
credentialsWindow.loadURL(`file://${__dirname}/dist/authentication/index.html`);
credentialsWindow.webContents.on('dom-ready', () => {
console.log('Credentials Window DOM is ready');
resolve();
});
credentialsWindow.on('close', async (e) => {
console.log("Closed credential window");
credentialsWindow.hide();
e.preventDefault();
await loadCredentials();
mainWindow.reload();
});
});
}
app.on('ready', async () => {
await Promise.all([
loadCredentials(),
createWindow(),
createCredentialsWindow(),
]);
mainWindow.show();
});
app.on("login", (event, contents, authencation, info, callback) => {
for (const credential of credentials) {
const parsedUrl = url.parse(credential.account);
if (parsedUrl.hostname === info.host) {
return callback(parsedUrl.auth, credential.password);
}
}
callback();
});

View File

@@ -0,0 +1,39 @@
{
"name": "docker-registry-ui",
"version": "1.4.8",
"productName": "Registry UI",
"description": "Electron Application for Docker Registry UI",
"main": "index.js",
"scripts": {
"start": "electron ./",
"start:dev": "parcel serve -d dist/authentication -t electron --public-url ./ authentication/index.html",
"build": "parcel build -d dist/authentication -t electron --public-url ./ authentication/index.html",
"rebuild": "electron-rebuild -f -w keytar",
"package": "electron-packager --overwrite .",
"sync": "copyfiles ../../dist/* ../../dist/**/* ./examples/out",
"dist": "npm run rebuild && npm run sync && npm run build && npm run package"
},
"dependencies": {
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.52",
"electron-is-dev": "^1.1.0",
"keytar": "^7.3.0",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {
"copyfiles": "^2.2.0",
"electron": "^11.2.3",
"electron-builder": "^22.6.0",
"electron-packager": "^15.2.0",
"electron-rebuild": "^2.3.5",
"parcel-bundler": "^1.12.4",
"typescript": "^3.8.3"
},
"keywords": [
"electron"
],
"author": "",
"license": "AGPL-3.0"
}

View File

@@ -63,7 +63,7 @@ registry:
image:
registry: docker.io
repository: registry
tag: 2.6.2
tag: 2.7.1
pullPolicy: Always
probe:
liveness: true

View File

@@ -2,7 +2,7 @@ version: '2'
services:
registry-srv:
image: registry:2.7.1
image: registry:2.7
restart: always
volumes:
- storage:/var/lib/registry
@@ -24,14 +24,15 @@ services:
container_name: registry-srv
registry-ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
restart: always
ports:
- 80:80
environment:
- REGISTRY_TITLE=Private Docker Registry
- URL=http://localhost:5000
- REGISTRY_URL=http://localhost:5000
- DELETE_IMAGES=true
- SINGLE_REGISTRY=true
container_name: registry-ui
networks:

View File

@@ -1,6 +1,6 @@
# Example for issue #20 (HTTPS supports)
This example will override the original nginx conf with one supporting HTTPS. You will need to rewrite all the project configuration (replaces `proxy_pass` with our value).
This example will override the original nginx conf with one supporting HTTPS. You will need to rewrite all the project configuration (replaces `proxy_pass` with your own value, in this example `http://registry:5000` is fine).
Generating a self signed certificate:

View File

@@ -1,15 +1,16 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
networks:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
environment:
- SINGLE_REGISTRY=true
- REGISTRY_TITLE=My Private Docker Registry
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf

View File

@@ -6,6 +6,9 @@ server {
ssl_certificate_key /etc/nginx/certs/privkey.pem;
root /usr/share/nginx/html;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
location /v2 {
# Do not allow connections from docker 1.5 and earlier
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
@@ -19,6 +22,7 @@ server {
server {
listen 80;
location / {
# Force HTTPS
return 301 https://$host$request_uri;
}
}

View File

@@ -1,17 +1,18 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
networks:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
environment:
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://registry:5000
- NGINX_PROXY_PASS_URL=http://registry:5000
- SINGLE_REGISTRY=true
depends_on:
- registry
networks:

View File

@@ -10,12 +10,13 @@ services:
network_mode: host
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
ports:
- 80:80
environment:
- URL=http://127.0.0.1:5000
- REGISTRY_URL=http://127.0.0.1:5000
- DELETE_IMAGES=true
- SINGLE_REGISTRY=true
depends_on:
- registry
network_mode: host

View File

@@ -28,7 +28,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://127.0.0.1']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

View File

@@ -15,6 +15,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['*']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Accept']
Access-Control-Expose-Headers: ['Docker-Content-Digest']
health:
storagedriver:

View File

@@ -2,7 +2,7 @@ version: '2'
services:
registry-srv:
image: registry:latest
image: registry:2.7
restart: always
volumes:
- storage:/var/lib/registry
@@ -12,14 +12,15 @@ services:
container_name: registry-srv
registry-ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
restart: always
ports:
- 8080:80
environment:
- REGISTRY_TITLE=Private Docker Registry
- REGISTRY_URL=http://registry-srv:5000
- NGINX_PROXY_PASS_URL=http://registry-srv:5000
- DELETE_IMAGES=true
- SINGLE_REGISTRY=true
networks:
- registry-ui-net
container_name: registry-ui

View File

@@ -25,7 +25,7 @@ data:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['*']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

View File

@@ -5,7 +5,7 @@ metadata:
labels:
app: registry
release: docker-registry-ui
app/version: "1.2.1"
app/version: "2.0.0"
spec:
replicas: 1
selector:
@@ -28,7 +28,7 @@ spec:
claimName: docker-registry
containers:
- name: registry
image: "docker.io/registry:2.6.2"
image: "docker.io/registry:2.7"
imagePullPolicy: Always
ports:
- name: registry

View File

@@ -4,7 +4,7 @@ metadata:
labels:
app: registry
release: docker-registry-ui
app/version: "1.2.1"
app/version: "2.0.0"
name: docker-registry
spec:
accessModes:

View File

@@ -5,7 +5,7 @@ metadata:
labels:
app: registry
release: docker-registry-ui
app/version: "1.2.1"
app/version: "2.0.0"
spec:
type: ClusterIP
ports:

View File

@@ -5,7 +5,7 @@ metadata:
labels:
app: registry-ui
release: docker-registry-ui
app/version: "1.2.1"
app/version: "2.0.0"
spec:
replicas: 1
selector:
@@ -27,10 +27,12 @@ spec:
value: "Docker registry UI"
- name: DELETE_IMAGES
value: "false"
- name: REGISTRY_URL
- name: NGINX_PROXY_PASS_URL
value: "http://docker-registry.default:5000"
- name: PULL_URL
value: "docker-registry-ui.default:80"
- name: SINGLE_REGISTRY
value: "true"
ports:
- name: http
containerPort: 80

View File

@@ -5,7 +5,7 @@ metadata:
labels:
app: registry-ui
release: docker-registry-ui
app/version: "1.2.1"
app/version: "2.0.0"
spec:
type: LoadBalancer
ports:

View File

@@ -10,13 +10,14 @@ services:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://registry:5000
- NGINX_PROXY_PASS_URL=http://registry:5000
- NGINX_PROXY_HEADER_X_Forwarded_For=$$proxy_add_x_forwarded_for
- SINGLE_REGISTRY=true
volumes:
- ./nginx.env:/etc/nginx/.env
depends_on:

View File

@@ -15,7 +15,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://localhost']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

View File

@@ -0,0 +1,10 @@
# Docker registry with read only access
This example will override the original nginx conf with read only access to the registry. You will need to rewrite all the project configuration (replaces `proxy_pass` with your own value, in this example `http://registry:5000` is fine).
There are two htpasswd files. `read-write.htpasswd` a read and write access to the registry and `read-only.htpasswd` for a read only access.
All users in `read-only.htpasswd` should be in `read-write.htpasswd`.
Read only user: login: `read` password: `regisrty`.
Read and write user: login: `write` password: `regisrty`.

View File

@@ -0,0 +1,27 @@
version: '2.0'
services:
registry:
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
- ./registry.yml:/etc/docker/registry/config.yml
networks:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:latest
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- SINGLE_REGISTRY=true
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./read-write.htpasswd:/etc/nginx/auth/read-write.htpasswd:ro
- ./read-only.htpasswd:/etc/nginx/auth/read-only.htpasswd
depends_on:
- registry
networks:
- registry-ui-net
networks:
registry-ui-net:

View File

@@ -0,0 +1,55 @@
server {
listen 80;
server_name localhost;
#! resolver 127.0.0.11; # This is for docker container name resolver
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/moby/moby/issues/1486)
chunked_transfer_encoding on;
# required for strict SNI checking: see Issue #70 (https://github.com/Joxit/docker-registry-ui/issues/70)
proxy_ssl_server_name on;
proxy_buffering off;
proxy_ignore_headers "X-Accel-Buffering";
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /v2 {
# Do not allow connections from docker 1.5 and earlier
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
# To add basic authentication to v2 use auth_basic setting.
auth_basic "Registry realm";
auth_basic_user_file /etc/nginx/auth/read-write.htpasswd;
# For requests that *aren't* a PUT, POST, or DELETE
limit_except PUT POST DELETE {
auth_basic_user_file /etc/nginx/auth/read-only.htpasswd;
}
proxy_pass http://registry:5000;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

View File

@@ -0,0 +1,2 @@
read:$2y$05$NHpWy4HuCM8Ol2wZJsf6/.cJtGgv61jWzHTCYt/WntzRLDse1IuVO
write:$2y$05$aqLmS1hXojRnubpSN4aVDeZ8wLhJtmQr4v0NiZl4KHUHXhDVnyoQm

View File

@@ -0,0 +1 @@
write:$2y$05$aqLmS1hXojRnubpSN4aVDeZ8wLhJtmQr4v0NiZl4KHUHXhDVnyoQm

View File

@@ -0,0 +1,21 @@
version: 0.1
log:
fields:
service: registry
storage:
delete:
enabled: true
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://localhost']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

View File

@@ -0,0 +1,2 @@
data/registry/
data/keycloak/

View File

@@ -0,0 +1,137 @@
# Token Authentication with Keycloak
In this example, we'll see how to configure your keycloak server and use token authentication with your registry. This will use the [docker registry v2 token authentication protocol](https://docs.docker.com/registry/spec/auth/token/).
![token protocol](https://docs.docker.com/registry/spec/images/v2-registry-auth.png)
In this image, we will replace the docker client/daemon by the Docker Registry UI. Here are the steps:
1. Attempt to get a resource (catalog, image info, image delete) with the registry.
2. If the registry requires authorization it will return a `401 Unauthorized` HTTP response with information on how to authenticate.
3. The **docker registry ui** makes a request to **keycloak** for a Bearer token.
1. Your browser will use the [Basic Access Authentication Protocol](https://en.wikipedia.org/wiki/Basic_access_authentication#Protocol). But keycloak does not support this protocol... That's why we need a nginx proxy on top of keycloak.
2. Your proxy will receive a request on `/auth/realms/{realm name}/protocol/docker-v2/auth` without `Authentication` header. It will return a `401 Unauthorized` HTTP response with `WWW-Authenticate` header.
3. Your browser will ask you your credentials.
4. The proxy will pass the credentials to keycloak.
4. Keycloak returns an opaque Bearer token representing the clients authorized access.
5. The **docker registry ui** retries the original request with the Bearer token embedded in the requests Authorization header.
6. The Registry authorizes the client by validating the Bearer token and the claim set embedded within it and begins the session as usual.
:warning: If you are configuring from scratch your own keycloak server, remove files in `data` folder first with certificates in `conf/registry/localhost.*`
## Configure your nginx/proxy server
I will highlight required configuration for Basic Access Authentication Protocol. Replace the `{realm name}` by the name of your realm. In my example the realm is master, but you should create your own realm for your users.
```nginx
resolver 127.0.0.11 valid=30s;
set $keycloak "http://keycloak:8080";
# Location to get keycloak token
location /auth/realms/{realm name}/protocol/docker-v2/auth {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
# By default, keycloak returns 400 instead of 401, we need to change that
if ($http_authorization = "") {
add_header WWW-Authenticate 'Basic realm="Keycloak login"' always;
return 401;
}
proxy_pass $keycloak;
}
```
Start your nginx server. It will be available on http://localhost/ in my example.
```sh
docker-compose up -d proxy
```
## Configure your keycloak server
I will highlight required configuration for docker protocol. You will need to add this option to your keycloak command line:
```
-Dkeycloak.profile.feature.docker=enabled
```
Then the defalt user can be configured via environment variables
```yml
services:
keycloak:
image: jboss/keycloak
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
user: root
networks:
- registry-ui-net
command: -Dkeycloak.profile.feature.docker=enabled -b 0.0.0.0
```
Now you can start your keycloak server, it will be available on http://localhost/auth in my example.
```sh
docker-compose up -d keycloak
```
Now you need to configure your docker client with these steps:
Go to the keycloak home page: http://localhost/auth and click on `Administration Console`.
![keycloak-home](https://raw.github.com/Joxit/docker-registry-ui/main/examples/token-auth-keycloak/images/01-keycloak-home.png)
Sign in with your login and password (in my example it's `admin` and `password`).
![keycloak-home](https://raw.github.com/Joxit/docker-registry-ui/main/examples/token-auth-keycloak/images/02-keycloak-signin.png)
Go to `Clients` in the left side menu.
![keycloak-home](https://raw.github.com/Joxit/docker-registry-ui/main/examples/token-auth-keycloak/images/03-keycloak-to-clients.png)
Create a new client.
![keycloak-home](https://raw.github.com/Joxit/docker-registry-ui/main/examples/token-auth-keycloak/images/04-keycloak-create-client.png)
Enter a name for `Client ID`, choose `docker-v2` as the `Client Protocol`, and click `Save`.
![keycloak-home](https://raw.github.com/Joxit/docker-registry-ui/main/examples/token-auth-keycloak/images/05-keycloak-new-client.png)
Navigate to `Installation` tab, choose `Docker Compose YAML` as `Format Option` and click `Download`
![keycloak-home](https://raw.github.com/Joxit/docker-registry-ui/main/examples/token-auth-keycloak/images/06-keycloak-download.png)
When you extract the archive, the resulting directory should look like this.
```
keycloak-docker-compose-yaml
├── certs
│ ├── localhost.crt
│ ├── localhost.key
│ └── localhost_trust_chain.pem
├── data
├── docker-compose.yaml
└── README.md
```
Copy all the files from `certs` folder to `conf/registry` (this will replace files generated for this example).
## Configure your registry server
The last step is the configuration of your registry server. The config file is located in `conf/registry/config.yml`. The import part of the configuration is `auth.token` where you need to set `realm`, `service`, `issuer` and the `rootcertbundle` from the previous archive.
```yml
auth:
token:
realm: http://localhost/auth/realms/{realm name}/protocol/docker-v2/auth
service: docker-registry
issuer: http://localhost/auth/realms/{realm name}
rootcertbundle: /etc/docker/registry/localhost_trust_chain.pem
```
Now you can start your docker registry with your docker registry ui.
```sh
docker-compose up -d registry ui
```

View File

@@ -0,0 +1,78 @@
server {
listen 80;
server_name localhost;
resolver 127.0.0.11 valid=30s;
set $keycloak "http://keycloak:8080";
set $registry "http://registry:5000";
set $ui "http://ui";
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/moby/moby/issues/1486)
chunked_transfer_encoding on;
# required for strict SNI checking: see Issue #70 (https://github.com/Joxit/docker-registry-ui/issues/70)
proxy_ssl_server_name on;
proxy_buffering off;
proxy_ignore_headers "X-Accel-Buffering";
location /v2 {
# Do not allow connections from docker 1.5 and earlier
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_pass $registry;
}
location /auth {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_pass $keycloak;
}
location /auth/realms/master/protocol/docker-v2/auth {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
if ($http_authorization = "") {
add_header WWW-Authenticate 'Basic realm="Keycloak login"' always;
return 401;
}
proxy_pass $keycloak;
}
location /ui {
proxy_pass $ui;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

View File

@@ -0,0 +1,27 @@
version: 0.1
log:
fields:
service: registry
storage:
delete:
enabled: true
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://localhost']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']
auth:
token:
realm: http://localhost/auth/realms/master/protocol/docker-v2/auth
service: docker-registry
issuer: http://localhost/auth/realms/master
rootcertbundle: /etc/docker/registry/localhost_trust_chain.pem

View File

@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICmzCCAYMCBgF3SzuJuTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0
ZXIwHhcNMjEwMTI4MjMwMDI5WhcNMzEwMTI4MjMwMjA5WjARMQ8wDQYDVQQDDAZt
YXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCliGzyYtDTTmaj
QYso8nxIY2tO5ITnRbgDQIXMuAY5HMv2XglT2zSHJNfC/HYSilZPSd8Ee/0oxm/q
On1Al3JENx21txUWOBe48CVzLlIYlUnIXqaFh0YyL6feUZaDKg1YSVGhSzHDI57X
DcfnR+g0V5QxzIKzK624Lw7vqGvZz5e9sS9mTn9EZUmqQRQBerB5qrPnuDLxEbj4
LPxqjuFyKQ4g8wooYlBNSFruRas3TpG/90Xy15pa9a3ofiVPZCt3IoaQGPw4Ah3O
ygnelgEhWNRwROx4dErmW2l7dUQP8dbSz+qI4g04Wx3GjnZAlY7mt7LG8OncavsA
Gp52m8QrAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAGvqPm9nmEMfGYjWN6JlnM2x
/YkKzvH6B+IeXz/j2bXKZqQoQ1up62HNM4e3GKSw/51Lge6QXqgOZmFSHABev8EV
+vzDMfRLjBfV1RmhZXYCh6nje0d61jAa0Sn6CfsUllIQRt3Hn67qzPk1d6SnKSHA
tsbh5+pCDivfJBRm7sJCv1y9dPP1rlaxAOZrVU8LEsJlTP3D0OScrDQv09CVonwi
4W2bnLcB6aPW5Fw3gyY4TtXfcQzQqbV5Gjs9EZNA6Vczu+80U14T4VD9CDgC8yky
2KY2pGClWEjM+dJnZ0440wXuGK/lJEN41SzfKxyfCBTJVebwOXsqsyonYYK8Pxo=
-----END CERTIFICATE-----

View File

@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCliGzyYtDTTmaj
QYso8nxIY2tO5ITnRbgDQIXMuAY5HMv2XglT2zSHJNfC/HYSilZPSd8Ee/0oxm/q
On1Al3JENx21txUWOBe48CVzLlIYlUnIXqaFh0YyL6feUZaDKg1YSVGhSzHDI57X
DcfnR+g0V5QxzIKzK624Lw7vqGvZz5e9sS9mTn9EZUmqQRQBerB5qrPnuDLxEbj4
LPxqjuFyKQ4g8wooYlBNSFruRas3TpG/90Xy15pa9a3ofiVPZCt3IoaQGPw4Ah3O
ygnelgEhWNRwROx4dErmW2l7dUQP8dbSz+qI4g04Wx3GjnZAlY7mt7LG8OncavsA
Gp52m8QrAgMBAAECggEAS7VHztwvElXrT4Ost/+fpCQEckLGHlievq4GBAmunvRy
vK1pqra5IY5SOFXrUrN+oijxHUXwFXQcv44ctywNEPH8Xp3rwQvKncUH+9QVrDSr
WD8h/jROgKmXJ3E9W6QiEl0GPrT7f3qNLWKaKUeUBkx/9P7KUFQL0g+Dz0zCdw1k
wzJNE+tJgspeInlgylmXsuT2A0lPkIDq6uxZY/yhaEG03dytX12Mmg5VcfIzjLWB
cF0hKDbb+Pmu+tWbLHEwHg00Qj3k7Y21u9DrHRC0uBYrVsytSxDIuayRfwskAcIm
fyMNAYVtOQxzdaDm2OTT0SAZJOOxa+ZYMGToEzzFcQKBgQDTp961U0RAlbfygA4a
IDxSvLDaIQ1pZuDzHwm/8b7SNGWiTSCjSWXZFd35rOXian53u69ey61ZTIAyv1sQ
c7R1yCfyg8YUTWZLbl1s5Bb+ekh64WEaMmf+eChcegsXt/kW/wQKM9DLRMAM4v5Q
9g3VEMH5xuFdGRa2AwDVZrRB5wKBgQDINsNkPgxMq+B1GfnT6PpuyAWlb7GuUENc
yAucIBMGKdY8QlwnQmAaKPTl1t/MFsiiwUhRJiyXurG+skd3BmMPdACWnXa7nKBW
XoXM6MRhS1QrDds6hid1usO86fB50UhupSr3tkHdeWy8l1erll/rhrParSyer1iK
AjLfwx2rHQKBgQCaGTehpv0jVJ43tZoO1Xd1+aF9PuFH4zpWaDut/zEiVDnHAAaK
O+8mLbCOjp5UyZpITGKzTvFn+bXAvOdtRACYXGERRXWa5Htc4f6tQCepoZhRtvP+
ocJrWEpygfy/iReW8ZacYvtaczSsbTwh7/NENE42L+F26cRKQkeCF6OX8wKBgQDF
Y1hXp+SwYnO0f5uSlIryVTlb1TazyGXhP0hS8DxRQ0X3uuTnv8THhcGMJ8AUkhHU
hAIsHxqvrFw4ycMzUZSwU4mQ9EVuygg5no8DaijSU1Xz7IFKvaCBrVP1GB8BupdS
nnwyI/njxCaz9/FzNZnztqXy3fCzseP0jB5kBRVm8QKBgEDbzlXPdF5Jr4mb3+Pt
hqhAP1Swx2vwIyooDqhP0D5nUV1EDJ6Hqwb6L9R0Apt2gLW0YD1ETh9TsqUOWbIm
kiE9IDHZFbtBj014clx3if6snKarrjaHQJ9THzB5uwtv8b3/k81T/IyAnPmXobQx
Rrw+6hjfOdQsT90raYyhRWWx
-----END PRIVATE KEY-----

View File

@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICmzCCAYMCBgF3SzrlgjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0
ZXIwHhcNMjEwMTI4MjI1OTQ3WhcNMzEwMTI4MjMwMTI3WjARMQ8wDQYDVQQDDAZt
YXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDHFs8UdWQrDZ/K
RMvX/bu4SYa4fq38OHCu/ci8c/Vjuz8A4TI6hn84i82WLdHsiXpi4PO4YnGxTxHF
vI8cAarLW2aYv8ZK81YP63kPUMGS3dMtQE8CRTAtHBOVXrxp6ab18kTeQZ/KxiXy
nQM4rM7nSy+zoCY1AcPAvzLz0uqD/D8jBvsR90mrnHGrS2cJZCvaKkwfpMddUBOv
qnlrDjiv0T5PE0fShvZWlUJn4tVhjwXGv6Nu32o87BnEE+6LoQek8YqaXohQLE3V
MVFOHnxmCr7JwMk1Cdr+R2WyHleeC+FTL+O+kcpAzz9DIAhhUs2bHMR2OJAP3l4X
PfPPGeWhAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAIy0ru1wK6HTqO2UrNxa/Yqa
GXdppS5tj2ssivKBqTc88TK2n8ORUyVVDeGVvicgASkru7ZjepR6APhdDG5Gy44x
xnj/207txc6YXz+TS/2JO5SMNWrwQCwmjT9Ld4HtjEzzxt3O7tGUmSpRIAoRo4Zy
gpaGuiHvJ0twhZWwcFS4sEYuGfF3uQ+hR2MQuSVm9El6GihY6c7dpv7E5GL71dDm
VPjuN9/rkxEUvFl0EHZByfUpqXnVhujEDgw8eSyOleIFNJ0vEKKJRnbwcIi2SQ2z
zPZjXKdr03R7YukmdMV5X7Swn7ehwF6AJijw6zpCoKcaiOQYexGMXxasK2xXw90=
-----END CERTIFICATE-----

View File

@@ -0,0 +1 @@
cc04bebe-cb07-4384-b886-3670f757fd2e

View File

@@ -0,0 +1,163 @@
2021-01-28 22:43:31 jdbc[3]: exception
org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOGLOCK" not found; SQL statement:
select count(*) from PUBLIC.DATABASECHANGELOGLOCK [42102-197]
2021-01-28 22:43:32 jdbc[4]: exception
org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOG" not found; SQL statement:
select count(*) from PUBLIC.DATABASECHANGELOG [42102-197]
2021-01-28 22:43:32 jdbc[4]: exception
org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOG" not found; SQL statement:
select count(*) from PUBLIC.DATABASECHANGELOG [42102-197]
2021-01-28 22:44:05 jdbc[4]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
2021-01-28 22:44:05 jdbc[3]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
2021-01-28 23:16:37 jdbc[5]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
2021-01-28 23:16:37 jdbc[4]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
2021-01-28 23:16:37 jdbc[3]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
2021-01-28 23:17:00 jdbc[4]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
2021-01-28 23:17:00 jdbc[3]: exception
org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
at com.h2database.h2@1.4.197//org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:179)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:155)
at com.h2database.h2@1.4.197//org.h2.message.DbException.get(DbException.java:144)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512)
at com.h2database.h2@1.4.197//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516)
at org.jboss.ironjacamar.jdbcadapters@1.4.23.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:485)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945)
at org.jboss.ironjacamar.impl@1.4.23.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:232)
at org.jboss.as.connector@21.0.2.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:186)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)

View File

@@ -0,0 +1,41 @@
version: '2.4'
services:
keycloak:
image: jboss/keycloak
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
user: root
volumes:
- ./data/keycloak:/opt/jboss/keycloak/standalone/data/
networks:
- registry-ui-net
command: -Dkeycloak.profile.feature.docker=enabled -b 0.0.0.0
proxy:
image: nginx:alpine
ports:
- 80:80
volumes:
- ./conf/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- registry-ui-net
ui:
image: joxit/docker-registry-ui
environment:
REGISTRY_TITLE: My Private Docker Registry
REGISTRY_URL: http://localhost
SINGLE_REGISTRY: 'true'
networks:
- registry-ui-net
registry:
image: registry:2.7
volumes:
- ./conf/registry/:/etc/docker/registry/
- ./data/registry:/var/lib/registry
networks:
- registry-ui-net
networks:
registry-ui-net:

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -1,7 +1,7 @@
version: '3.1'
services:
registry:
image: registry:2.6.2
image: registry:2.7
volumes:
- /opt/docker-registry:/var/lib/registry
environment:
@@ -12,11 +12,12 @@ services:
constraints: [node.role == manager]
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
environment:
- DELETE_IMAGES=true
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://docker-registry_registry:5000
- NGINX_PROXY_PASS_URL=http://docker-registry_registry:5000
- SINGLE_REGISTRY=true
depends_on: ['registry']
networks: ['proxy', 'default']
deploy:

View File

@@ -1,7 +1,7 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
- ./registry-config/credentials.yml:/etc/docker/registry/config.yml
@@ -10,12 +10,13 @@ services:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://registry:5000
- NGINX_PROXY_PASS_URL=http://registry:5000
- SINGLE_REGISTRY=true
depends_on:
- registry
networks:

View File

@@ -15,7 +15,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://localhost']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

View File

@@ -1,19 +1,20 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
networks:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://registry:5000
- NGINX_PROXY_PASS_URL=http://registry:5000
- SINGLE_REGISTRY=true
depends_on:
- registry
networks:

View File

@@ -13,7 +13,7 @@ docker-compose -f simple.yml up -d
./populate.sh
```
You can add some credentials to access your registry wit `credentials.yml` docker-compose file.
You can add some credentials to access your registry with `credentials.yml` docker-compose file.
Credentials for this example are login: `registry` and password: `ui` using bcrypt.
```sh

View File

@@ -1,7 +1,7 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
ports:
- 5000:5000
volumes:
@@ -10,11 +10,12 @@ services:
- ./registry-config/htpasswd:/etc/docker/registry/htpasswd
ui:
image: joxit/docker-registry-ui:static
image: joxit/docker-registry-ui:latest
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- URL=http://localhost:5000
- REGISTRY_URL=http://localhost:5000
- SINGLE_REGISTRY=true
depends_on:
- registry

View File

@@ -15,7 +15,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://localhost']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

View File

@@ -15,7 +15,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://localhost']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']

Some files were not shown because too many files have changed in this diff Show More