Compare commits

..

91 Commits
1.2.2 ... 1.5.4

Author SHA1 Message Date
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
Joxit
2e915a82b1 fix(delete): fix bug introduced in 1.4.3
resolves #119
2020-01-27 00:17:36 +01:00
Joxit
e3d592ac65 fix: UI showing same sha256 content digest for all tags when using credentials
resolves #116
2020-01-26 12:25:56 +01:00
Joxit
531f9400a0 chore: add example for #116 2020-01-26 12:00:22 +01:00
Joxit
d7f6cd7e1a chore: update readme for delete issue from #104 2020-01-25 00:37:00 +01:00
Joxit
8524c0d18b fix(delete): update the message and wrap the delete function for onclick 2020-01-20 00:11:45 +01:00
Joxit
8b7bd6cfb8 fix: Default value for NGINX_PROXY_HEADER_Host is $http_host
Remove the Proxy header from default.conf

fixes #113
2020-01-19 08:49:58 +01:00
Joxit
f56cd055a2 chore: add @pidario as contributor 🎉 2020-01-10 21:45:32 +04:00
Joxit
79203787bd fix: add supports to oci images (containers/buildah)
Fixes #114
2020-01-10 21:38:43 +04:00
Jones Magloire
32d895a09d Merge pull request #112 from das7pad/misc-fix-typo
[misc] fix a typo in CONTRIBUTORS
2019-11-14 14:38:04 +01:00
Jakob Ackermann
bc26eca908 [misc] fix a typo in a section title of the CONTRIBUTORS file
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-11-13 15:51:59 +01:00
Joxit
e301dda408 release: v1.4.0 add image digest in taglist with some minor fix 2019-10-06 00:23:52 +02:00
Joxit
ce93a4da92 Readme: add more informations about NGINX_PROXY_HEADER_ option 2019-10-05 23:50:10 +02:00
Jones Magloire
7296c2e727 Add Contributor Covenant Code of Conduct 2019-09-28 22:27:52 +02:00
Joxit
94fcd53792 fix: contributors list 2019-09-26 22:03:08 +02:00
Jones Magloire
95558fe75a Merge pull request #106 from Joxit/contrib/templates
Update issue templates
2019-09-25 07:14:11 +02:00
Joxit
44f3242b85 Add issue templates and contributors.md 2019-09-24 22:41:38 +02:00
Jones Magloire
9b05503e77 Merge pull request #107 from das7pad/feat-drop-head-request
[remove-image] speed up removal process
2019-09-23 00:20:20 +02:00
Jakob Ackermann
980c5ddaa9 [remove-image] speed up removal process
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-21 12:20:53 +02:00
Jones Magloire
2eeae54bca Merge pull request #102 from das7pad/feat-image-digest
[taglist] display the image digest
2019-09-21 05:53:58 +02:00
Jakob Ackermann
f7fe27c07e [copy-to-clipboard] remove not needed update call
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-20 23:32:27 +02:00
Jakob Ackermann
48aba129ce [app] unify error message for blocked access on Docker-Content-Digest
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-20 00:32:16 +02:00
Jakob Ackermann
a2e81ac12c [http] use Docker-Content-Digest header instead of ETag
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-20 00:07:43 +02:00
Jones Magloire
a48ce7ef75 Merge pull request #103 from berpec/patch-1
Fix typo
2019-09-17 00:34:17 +02:00
Jakob Ackermann
04f4c204d8 [taglist] display the image content digest per tag
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-12 17:37:06 +02:00
Jakob Ackermann
41d71a1991 [taglist] remove redundant information about the repository
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-12 17:36:05 +02:00
Jones Magloire
b3fbaff578 Merge pull request #101 from das7pad/hotfix-ie11
[tag-history] misc: fix for ie11
2019-09-12 17:21:50 +02:00
Bertrand Pechenot
5e2ead0c2a Fix typo 2019-09-12 14:58:52 +02:00
Jakob Ackermann
70d5ae2601 [tag-history] misc: fix for ie11
REF: 7163150cf5
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-08 18:20:10 +02:00
Jones Magloire
3b0e63ff12 Merge pull request #100 from das7pad/feat-pretty-print-repo
[registryUI] pretty print the registry url
2019-09-08 14:27:14 +02:00
Jakob Ackermann
b6144ae13f [registryUI] pretty print the registry url
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-07 10:32:02 +02:00
Jones Magloire
65bbac3453 Merge pull request #99 from das7pad/hotfix-missing-registry
[catalog] inject a confirmed repository into the local state
2019-09-07 04:16:03 +02:00
Jakob Ackermann
d380a767af [catalog] inject a confirmed repository into the local state
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-09-06 23:35:40 +02:00
Jones Magloire
36c44b19a3 Merge pull request #98 from Joxit/FAQ
Add FAQ in Readme
2019-09-05 21:31:48 +02:00
Joxit
28310f9804 Add more questions in FAQ 2019-09-04 21:29:58 +02:00
Joxit
6296a192d6 Add FAQ in Readme 2019-08-31 23:43:34 +02:00
Joxit
a0c88d06f0 Release v1.3.0: pagination in taglist and indent aggregated entries 2019-07-18 01:13:57 +02:00
Joxit
eec736d4e8 feat: Indent aggregated entries after expansion
closes: #90
2019-07-17 23:59:59 +02:00
Joxit
9e99b08b82 fix: delete toggle button when delete is disabled 2019-07-06 11:59:59 +02:00
Jones Magloire
0f805daafa Merge pull request #86 from Joxit/feat/36-pagination
[Feat #36] Pagination in taglist

## UI update

![image](https://user-images.githubusercontent.com/5153882/59188702-8da13700-8b78-11e9-87ff-64d1b6c8d380.png)

resolves #36 

cc @madhukar93 @gionn
2019-07-05 00:11:23 +02:00
Joxit
8bd1f31c9c Release v1.2.3: Custom header supports 2019-07-04 23:09:11 +02:00
Jones Magloire
7777ff28df Merge pull request #89 from Joxit/custom-headers
Supports custom headers when the ui is used as proxy

## Background

Headers can be useful in some cases such as avoid sending credentials when you are on the UI (like #87). Or give to the registry server other properties such as `X-Forward-For` or `Server` headers for monitoring.

## How to use ?

This is compatible only with static version of the UI and used with `REGISTRY_URL` variable.
When you want to add a custom header, add to the registry ui a environment variable or entry in `/etc/nginx/.env` which looks like `NGINX_PROXY_HEADER_Custom_Header`. All underscores (`_`) will be replaced by hyphens (`-`). 

Some example of custom headers as variable:
- `NGINX_PROXY_HEADER_Authorization` for Basic auth credentials
- `NGINX_PROXY_HEADER_X_Forwarded_For` for identifying the originating IP address of a client

An example is bundled with this PR

closes: #87
2019-07-03 00:09:18 +02:00
Joxit
4fee7b44d3 feat: Supports custom headers via file /etc/nginx/.env
Remove the print of headers for security
2019-07-02 23:04:32 +02:00
Joxit
79960ea52d fix(pagination): page switch and regression on multi delete 2019-06-27 23:54:20 +02:00
Joxit
7716f8b44a feat: Supports custom headers when the ui is used as proxy 2019-06-24 23:54:21 +02:00
Joxit
0ac7a151d9 fix(pagination): Wrong calcul for num pages 2019-06-23 22:55:32 +02:00
Joxit
ef149bf1cc chore: Memory optimization when delete is not activated 2019-06-17 00:46:46 +02:00
Joxit
e5a406a6ba fix(pagination): Reset the number of selected tags to delete when the page is updated 2019-06-16 23:07:54 +02:00
Joxit
dbb746981a fix(pagination): Improve spacing for page next and first page buttons 2019-06-15 22:37:24 +02:00
Joxit
92fc37adb4 feat(pagination): Add handler to pagination buttons 2019-06-04 22:06:14 +02:00
Joxit
02210e0943 fix(pagination): getPage doesn't work for page 2 and now support query param 2019-06-03 01:39:23 +02:00
Joxit
0199f87087 feat(pagination): Identify the current page 2019-05-31 00:44:29 +02:00
Joxit
3399030e4e feat(pagination): Add pagination component with its style 2019-05-30 00:11:05 +02:00
Joxit
660a938d6e feat(pagination): Small UI improvements 2019-05-27 22:23:24 +02:00
Joxit
7356591292 feat(pagination): Show only 100 first elements 2019-05-26 01:20:02 +02:00
123 changed files with 2013 additions and 380 deletions

View File

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

61
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,61 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
Hi, I use this docker registry UI and I have an issue...
## Bug description
A clear and concise description of what the bug is.
## How to Reproduce
For UI bug, steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
For service bug, steps to reproduce the behavior:
<!-- Remove your credentials or anonymize them -->
My docker-compose file
```yml
```
My private docker registry configuration
```yml
```
## Expected behavior
A clear and concise description of what you expected to happen.
## Screenshots
If applicable, add screenshots to help explain your problem.
## System information
- OS: [e.g. Debian 10, Windows, Android 9...]
<!-- Browser is only for UI bugs -->
- Browser:
- Name: [e.g. Chrome, Firefox...]
- Version: [e.g. 22]
- Docker registry UI:
- Version: [e.g. 1.4.0]
- Server: [docker or dist]
<!-- Only for Docker and for where the UI is hosted -->
- Docker version: [e.g. 19.03]
- Docker registry ui tag: [latest, static, master, 1.4-static...]
- OS/Arch: [e.g. linux/amd64]
- Tools: [e.g. docker-compose, kubernets..]
## Additional context
Add any other context about the problem here.

10
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

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 Standard 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 Static Version
uses: docker/build-push-action@v2
with:
context: .
file: ./static.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-static
joxit/docker-registry-ui:main-static

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 Standard 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 Static version
uses: docker/build-push-action@v2
with:
context: .
file: ./static.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:static
joxit/docker-registry-ui:${{steps.current-tag.outputs.tag}}-static

3
.gitignore vendored
View File

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

76
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at contact@joxit.dev. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

37
CONTRIBUTORS.md Normal file
View File

@@ -0,0 +1,37 @@
# Contributors
## Committers
- Jones Magloire [@Joxit](https://github.com/Joxit)
- Lennart Blom [@lennartblom](https://github.com/lennartblom)
- Jakob Ackermann [@das7pad](https://github.com/das7pad)
- Olivier Nizet [@onizet](https://github.com/onizet)
- Anton Antonov [@syndbg](https://github.com/syndbg)
- Bertrand Pechenot [@berpec](https://github.com/berpec)
- 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
- Ewout Prangsma [@ewoutp](https://github.com/ewoutp)
- [@soosap](https://github.com/soosap)
- Madhukar Mishra [@madhukar93](https://github.com/madhukar93)
- Yoan Blanc [@greut](https://github.com/greut)
- [@samuelmaier](https://github.com/samuelmaier)
- [@sbaloo](https://github.com/sbaloo)
- [@rucciva](https://github.com/rucciva)
- [@wuyue92tree](https://github.com/wuyue92tree)
- Giovanni Toraldo [@gionn](https://github.com/gionn)
- [@marcusblake](https://github.com/marcusblake)
- Dario Piombo [@pidario](https://github.com/pidario)
- Jernej K. [@Cvetk0](https://github.com/Cvetk0)
- 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,11 @@
#
# 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/
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

141
README.md
View File

@@ -1,5 +1,5 @@
---
title: Project Page
title: Docker Registry User Interface
---
# Docker Registry UI
@@ -10,17 +10,17 @@ 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**.
You have the choice between two versions, the **standard interface** (`joxit/docker-registry-ui:latest`) and the **static interface** (`joxit/docker-registry-ui:static`).
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.
With this version, you can manage **more than one** registry server but all the environment variables will be **unavailable**.
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.
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. With this version, you can manage **only one registry** and all environment variables will be **available**.
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) and [Live Demo](https://joxit.dev/docker-registry-ui/demo/)
## [Project Page](https://joxit.dev/docker-registry-ui), [Live Demo](https://joxit.dev/docker-registry-ui/demo/), [Examples](https://github.com/Joxit/docker-registry-ui/tree/master/examples)
![preview](https://raw.github.com/Joxit/docker-registry-ui/master/docker-registry-ui.gif "Preview of Docker Registry UI")
@@ -45,85 +45,65 @@ This web user interface uses [Riot](https://github.com/Riot/riot) the react-like
- 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**
- 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)) **static interface**.
- Limit the number of elements in the image list via `CATALOG_ELEMENTS_LIMIT` (see [#127](https://github.com/Joxit/docker-registry-ui/pull/127)) **static interface**.
- 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 **`joxit/docker-registry-ui:latest`** and **`joxit/docker-registry-ui:static`** tags ?
- The `latest` tag was the first version of the project, one UI for many docker registries. The `static` tag allows you to have an interface for a single registry and also allows you select your features.
- 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` ?
- The UI displays the compressed size of the image and not the extracted size version.
- Can I use HTTPS on the UI ?
- Yes, put your favourite reverse proxy on the front of the UI. Your reverse proxy will take care of HTTPS connection.
- Does the UI support authentication ?
- Yes, but it supports only basic auth. It's a simple standalone frontend, it will use your browser window for authentication.
- Can I use the UI and docker client with an insecure registry (registry url without https) ?
- Yes you can, you must first configure your docker client. (see [#76](https://github.com/Joxit/docker-registry-ui/issues/76))
- What does Mixed Content error mean ?
- This means you are using a UI with HTTPS and your registry is using HTTP (unsecured). When you are on a HTTPS site, you can't get HTTP content. Upgrade you registry with a HTTPS connection.
- Why the default nginx `Host` is set to `$http_host` ?
- 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/master/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
### Basic
The docker image contains the source code and nginx in order to serve the docker-registry-ui. Please remember the difference between the **standard interface** (`latest` tag) and **static interface** (`static` tags).
First you need node and npm in order to download dependencies.
### Run the standard interface
You can run the standard interface see the website on your 80 port. You will be able to use the interface for **many registry servers**, but all the configuration via environment variables from the static interface will be **unavailable**.
```sh
git clone https://github.com/Joxit/docker-registry-ui.git
cd docker-registry-ui
npm install
docker run -d -p 80:80 joxit/docker-registry-ui:latest
```
Now you can open index.html with your browser or use a http-server
### Run the static interface
```sh
npm install -g http-server
http-server
```
Some env options are available for use this interface for **only one 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`: set the static URL to use (You will need CORS configuration). Example: `http://127.0.0.1:5000`. (`Required`)
- `REGISTRY_URL`: 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).
- [`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`).
- [`SHOW_CONTENT_DIGEST`](https://github.com/Joxit/docker-registry-ui/issues/126): Show content digest in docker tag list. Default: `true`.
- [`CATALOG_ELEMENTS_LIMIT`](https://github.com/Joxit/docker-registry-ui/pull/132): Limit the number of elements in the catalog page. Default: `100000`.
Example with `URL` option.
@@ -157,10 +137,13 @@ If your docker registry need credentials, you will need to send these HEADERS:
http:
headers:
Access-Control-Allow-Origin: ['<your docker-registry-ui url>']
Access-Control-Allow-Credentials: true
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:
@@ -180,6 +163,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:
@@ -202,7 +187,7 @@ http:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://127.0.0.1:8001']
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']
@@ -212,12 +197,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/88))
- [Use docker-registry-ui with docker registry and Amazon s3](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-75) ([#75](https://github.com/Joxit/docker-registry-ui/issues/75))
- [FIX revproxy to registry does not work when published under non-root url](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-73) ([#73](https://github.com/Joxit/docker-registry-ui/issues/73))
- [Use docker-registry-ui with HTTPS](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-20) ([#20](https://github.com/Joxit/docker-registry-ui/issues/20))
- [Unable to push image when docker-registry-ui is used as a proxy on non 80 port](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-88) ([#88](https://github.com/Joxit/docker-registry-ui/issues/88))
- [Add custom headers bases on environment variable and/or file when the ui is used as proxy](https://github.com/Joxit/docker-registry-ui/tree/master/examples/proxy-headers) ([#89](https://github.com/Joxit/docker-registry-ui/pull/89))
- [UI showing same sha256 content digest for all tags + Delete is not working](https://github.com/Joxit/docker-registry-ui/tree/master/examples/issue-116) ([#116](https://github.com/Joxit/docker-registry-ui/issues/116))
- [Electron-based Standalone Application](https://github.com/Joxit/docker-registry-ui/tree/master/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/master/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

@@ -18,9 +18,10 @@ 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
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -19,3 +19,4 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -18,9 +18,10 @@ 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
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -19,3 +19,4 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -1,5 +1,5 @@
#!/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
@@ -8,13 +8,33 @@ if [ -z "${DELETE_IMAGES}" ] || [ "${DELETE_IMAGES}" = false ] ; then
sed -i -r "s/(isImageRemoveActivated[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi
if [ -n "${REGISTRY_URL}" ] ; then
sed -i "s,\${REGISTRY_URL},${REGISTRY_URL}," /etc/nginx/conf.d/default.conf
sed -i "s,#!,," /etc/nginx/conf.d/default.conf
if [ "${SHOW_CONTENT_DIGEST}" = false ] ; then
sed -i -r "s/(showContentDigest[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi
if [ -z "$@" ]; then
nginx -g "daemon off;"
else
$@
if [ -n "${CATALOG_ELEMENTS_LIMIT}" ] ; then
sed -i -r "s/(catalogElementsLimit[:=])[^,;]*/\1${CATALOG_ELEMENTS_LIMIT}/" scripts/docker-registry-ui.js
fi
get_nginx_proxy_headers() {
(
env &&
if [ -f "/etc/nginx/.env" ]; then
cat /etc/nginx/.env
# Force new line
echo ""
fi
) | while read e; do
if [ -n "$(echo $e | grep -o '^NGINX_PROXY_HEADER_')" ]; then
key=$(echo ${e%%=*} | sed 's/^NGINX_PROXY_HEADER_//' | sed 's/_/-/g')
value=${e#*=}
echo -n "proxy_set_header ${key} \"${value}\"; "
fi
done
}
if [ -n "${REGISTRY_URL}" ] ; then
sed -i "s,\${REGISTRY_URL},${REGISTRY_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

13
bin/fill-registry Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
for i in alpine chronograf:alpine consul debian jawg/mapnik3 nginx:alpine postgres:alpine redis:alpine telegraf:alpine joxit/docker-registry-ui joxit/kosmtik joxit/node joxit/rust-openssl joxit/tile-server-ui; do
docker pull $i
docker tag $i 127.0.0.1:5000/$i
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
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

View File

@@ -18,9 +18,10 @@ 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
COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -19,3 +19,4 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
WORKDIR /usr/share/nginx/html/
COPY dist/ /usr/share/nginx/html/
COPY favicon.ico /usr/share/nginx/html/

View File

@@ -21,7 +21,6 @@
<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:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" rel="stylesheet" type="text/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" />

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.

2
dist/index.html vendored
View File

@@ -13,4 +13,4 @@
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:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" 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><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 rel="stylesheet" href="vendor.css"><link rel="stylesheet" href="style.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><app></app><script src="scripts/vendor.js"></script><script src="scripts/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

2
dist/style.css vendored

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 KiB

After

Width:  |  Height:  |  Size: 686 KiB

13
examples/README.md Normal file
View File

@@ -0,0 +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))
- [Electron-based Standalone Application](https://github.com/Joxit/docker-registry-ui/tree/master/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/master/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

@@ -0,0 +1,42 @@
version: '2'
services:
registry-srv:
image: registry:2.7
restart: always
volumes:
- storage:/var/lib/registry
- ./htpasswd:/etc/docker/registry/htpasswd
ports:
- 5000:5000
environment:
- REGISTRY_HTTP_HEADERS_X-Content-Type-Options=[nosniff]
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin=['http://localhost']
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods=['HEAD', 'GET', 'OPTIONS', 'DELETE']
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers=['Authorization']
- REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers=['Docker-Content-Digest']
- REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials=['true']
- REGISTRY_AUTH_HTPASSWD_REALM=basic-realm
- REGISTRY_AUTH_HTPASSWD_PATH=/etc/docker/registry/htpasswd
- REGISTRY_STORAGE_DELETE_ENABLED=true
networks:
- registry-ui-net
container_name: registry-srv
registry-ui:
image: joxit/docker-registry-ui:static
restart: always
ports:
- 80:80
environment:
- REGISTRY_TITLE=Private Docker Registry
- URL=http://localhost:5000
- DELETE_IMAGES=true
container_name: registry-ui
networks:
registry-ui-net:
volumes:
storage:
driver: local

View File

@@ -0,0 +1,3 @@
# login: registry
# password: ui
registry:$2y$11$1bmuJLK8HrQl5ACS/WeqRuJLUArUZfUcP2R23asmozEpfN76.pCHy

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
networks:

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
networks:

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
@@ -20,8 +20,6 @@ services:
- REGISTRY_TITLE=Private Docker Registry
- REGISTRY_URL=http://registry-srv:5000
- DELETE_IMAGES=true
depends_on:
- debugproxy
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

@@ -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

9
examples/populate-registry Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
REGISTRY="${1:-localhost:5000}"
for image in alpine:latest alpine:edge alpine:3.11 alpine:3.10 alpine:3.9; do
docker pull $image
docker tag $image $REGISTRY/$image
docker push $REGISTRY/$image
done

View File

@@ -0,0 +1,19 @@
# Set custom headers to the registry example
The interface and the docker registry will be accessible with <http://localhost>.
This example highlight the usage of custom headers when the UI is used as a proxy. When you wants to use a header name with hyphens, replace them by underscores in the variable. You can put headers in environment variable or in config file `/etc/nginx/.env`. They have the same writing style.
Headers can be useful in some cases such as avoid sending credentials when you are on the UI. Or give to the registry server other properties such as X-Forward-For header.
I will set these two headers in this example. X-Forward-For by environment variable and Authorization by file.
In order to set your credentials in the header, you need to know how [Authorization](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) header works. Here we use the `Basic` authentication scheme, the credentials are constructed like this:
- The username and the password are combined with a colon (`registry:ui`).
- The resulting string is base64 encoded (`cmVnaXN0cnk6dWk=`). You can simply run `echo -n "registry:ui" | base64`.
- In your header, put this value `Basic cmVnaXN0cnk6dWk=`
- In your `/etc/nginx/.env`, the file will contains `NGINX_PROXY_HEADER_Authorization=Basic cmVnaXN0cnk6dWk=`
For X-Forward-For, replace all hyphens by underscores, and the value will be a nginx variable which is `$proxy_add_x_forwarded_for`. In your docker compose you will need to duplicate the `$` character. In your docker-compose, your environment will look like `NGINX_PROXY_HEADER_X_Forwarded_For=$$proxy_add_x_forwarded_for`
As usual, run the project with `docker-compose up -d` (for background mode)

View File

@@ -0,0 +1,28 @@
version: '2.0'
services:
registry:
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
- ./registry-config/credentials.yml:/etc/docker/registry/config.yml
- ./registry-config/htpasswd:/etc/docker/registry/htpasswd
networks:
- registry-ui-net
ui:
image: joxit/docker-registry-ui:static
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://registry:5000
- NGINX_PROXY_HEADER_X_Forwarded_For=$$proxy_add_x_forwarded_for
volumes:
- ./nginx.env:/etc/nginx/.env
depends_on:
- registry
networks:
- registry-ui-net
networks:
registry-ui-net:

View File

@@ -0,0 +1 @@
NGINX_PROXY_HEADER_Authorization=Basic cmVnaXN0cnk6dWk=

View File

@@ -0,0 +1,25 @@
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:
htpasswd:
realm: basic-realm
path: /etc/docker/registry/htpasswd

View File

@@ -0,0 +1 @@
registry:$2y$11$1bmuJLK8HrQl5ACS/WeqRuJLUArUZfUcP2R23asmozEpfN76.pCHy

View File

@@ -0,0 +1,10 @@
# Docker registry with read only access
This is the configuration for a docker registry UI using `REGISTRY_URL` (as a proxy) with read only access to the registry.
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:static
ports:
- 80:80
environment:
- REGISTRY_TITLE=My Private Docker Registry
- REGISTRY_URL=http://registry:5000
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

@@ -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:

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

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,7 +1,7 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
networks:

View File

@@ -1,7 +1,7 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
ports:
- 5000:5000
volumes:

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']

View File

@@ -1,7 +1,7 @@
version: '2.0'
services:
registry:
image: registry:2.6.2
image: registry:2.7
ports:
- 5000:5000
volumes:

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

View File

@@ -16,7 +16,7 @@ const useref = require('gulp-useref');
const injectVersion = require('gulp-inject-version');
const merge = require('stream-series');
const allTags = ['src/tags/*.tag', 'src/tags/dialogs/*.tag'];
const allTags = ['src/tags/*.riot', 'src/tags/dialogs/*.riot'];
const allScripts = [
'src/scripts/http.js',
@@ -24,7 +24,7 @@ const allScripts = [
'src/scripts/utils.js'
];
const staticTags = ['src/tags/*.tag'];
const staticTags = ['src/tags/*.riot'];
const staticScripts = [
'src/scripts/http.js',

View File

@@ -12,6 +12,8 @@ server {
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;
@@ -24,7 +26,7 @@ server {
#! if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
#! return 404;
#! }
#! proxy_set_header Host $http_host;
#! ${NGINX_PROXY_HEADERS}
#! proxy_pass ${REGISTRY_URL};
#! }

View File

@@ -1,8 +1,9 @@
{
"name": "docker-registry-ui",
"version": "1.2.2",
"version": "1.5.4",
"scripts": {
"build": "./node_modules/gulp/bin/gulp.js build"
"build": "./node_modules/gulp/bin/gulp.js build",
"build:electron": "npm run build && cd examples/electron && npm install && npm run dist"
},
"repository": {
"type": "git",
@@ -14,7 +15,7 @@
"dependencies": {},
"devDependencies": {
"del": "^3.0.0",
"gulp": "^4.0.1",
"gulp": "^4.0.2",
"gulp-clean-css": "^4.2.0",
"gulp-concat": "^2.6.0",
"gulp-filter": "^5.1.0",

BIN
src/fonts/Roboto-Bold.ttf Normal file

Binary file not shown.

BIN
src/fonts/Roboto-Bold.woff Normal file

Binary file not shown.

BIN
src/fonts/Roboto-Bold.woff2 Normal file

Binary file not shown.

BIN
src/fonts/Roboto-Light.ttf Normal file

Binary file not shown.

BIN
src/fonts/Roboto-Light.woff Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -25,8 +25,8 @@
<!-- build:css style.css -->
<link href="style.css" rel="stylesheet" type="text/css">
<link href="material-icons.css" rel="stylesheet" type="text/css">
<link href="roboto.css" rel="stylesheet" type="text/css">
<!-- endbuild -->
<link href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" 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" />
@@ -43,22 +43,24 @@
<script src="../node_modules/riot-mui/build/js/riot-mui.js"></script>
<!-- endbuild -->
<!-- build:js scripts/docker-registry-ui.js -->
<script src="tags/catalog.tag" type="riot/tag"></script>
<script src="tags/catalog-element.tag" type="riot/tag"></script>
<script src="tags/tag-history-button.tag" type="riot/tag"></script>
<script src="tags/tag-history.tag" type="riot/tag"></script>
<script src="tags/tag-history-element.tag" type="riot/tag"></script>
<script src="tags/taglist.tag" type="riot/tag"></script>
<script src="tags/image-tag.tag" type="riot/tag"></script>
<script src="tags/remove-image.tag" type="riot/tag"></script>
<script src="tags/copy-to-clipboard.tag" type="riot/tag"></script>
<script src="tags/dialogs/add.tag" type="riot/tag"></script>
<script src="tags/dialogs/change.tag" type="riot/tag"></script>
<script src="tags/dialogs/remove.tag" type="riot/tag"></script>
<script src="tags/dialogs/menu.tag" type="riot/tag"></script>
<script src="tags/image-size.tag" type="riot/tag"></script>
<script src="tags/image-date.tag" type="riot/tag"></script>
<script src="tags/app.tag" type="riot/tag"></script>
<script src="tags/catalog.riot" type="riot/tag"></script>
<script src="tags/catalog-element.riot" type="riot/tag"></script>
<script src="tags/tag-history-button.riot" type="riot/tag"></script>
<script src="tags/tag-history.riot" type="riot/tag"></script>
<script src="tags/tag-history-element.riot" type="riot/tag"></script>
<script src="tags/taglist.riot" type="riot/tag"></script>
<script src="tags/image-tag.riot" type="riot/tag"></script>
<script src="tags/remove-image.riot" type="riot/tag"></script>
<script src="tags/copy-to-clipboard.riot" type="riot/tag"></script>
<script src="tags/dialogs/add.riot" type="riot/tag"></script>
<script src="tags/dialogs/change.riot" type="riot/tag"></script>
<script src="tags/dialogs/remove.riot" type="riot/tag"></script>
<script src="tags/dialogs/menu.riot" type="riot/tag"></script>
<script src="tags/image-size.riot" type="riot/tag"></script>
<script src="tags/image-date.riot" type="riot/tag"></script>
<script src="tags/image-content-digest.riot" type="riot/tag"></script>
<script src="tags/pagination.riot" type="riot/tag"></script>
<script src="tags/app.riot" type="riot/tag"></script>
<script src="scripts/http.js"></script>
<script src="scripts/script.js"></script>
<script src="scripts/utils.js"></script>

52
src/roboto.css Normal file
View File

@@ -0,0 +1,52 @@
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(fonts/Roboto-Regular.eot); /* For IE6-8 */
src: local('Roboto Light'),
local('Roboto-Light'),
url(fonts/Roboto-Light.woff2) format('woff2'),
url(fonts/Roboto-Light.woff) format('woff'),
url(fonts/Roboto-Light.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(fonts/Roboto-Regular.eot); /* For IE6-8 */
src: local('Roboto Regular'),
local('Roboto-Regular'),
url(fonts/Roboto-Regular.woff2) format('woff2'),
url(fonts/Roboto-Regular.woff) format('woff'),
url(fonts/Roboto-Regular.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(fonts/Roboto-Regular.eot); /* For IE6-8 */
src: local('Roboto Bold'),
local('Roboto-Bold'),
url(fonts/Roboto-Bold.woff2) format('woff2'),
url(fonts/Roboto-Bold.woff) format('woff'),
url(fonts/Roboto-Bold.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(fonts/RobotoMono-Regular.eot); /* For IE6-8 */
src: local('Roboto Mono Regular'),
local('RobotoMono-Regular'),
local('Roboto-Mono-Regular'),
url(fonts/RobotoMono-Regular.woff2) format('woff2'),
url(fonts/RobotoMono-Regular.woff) format('woff'),
url(fonts/RobotoMono-Regular.ttf) format('truetype');
}

View File

@@ -22,6 +22,30 @@ function Http() {
this._headers = {};
}
Http.prototype.getContentDigest = function(cb) {
if (this.oReq.hasHeader('Docker-Content-Digest')) {
// Same origin or advanced CORS headers set:
// 'Access-Control-Expose-Headers: Docker-Content-Digest'
cb(this.oReq.getResponseHeader('Docker-Content-Digest'))
} else if (window.crypto && window.TextEncoder) {
crypto.subtle.digest(
'SHA-256',
new TextEncoder().encode(this.oReq.responseText)
).then(function (buffer) {
cb(
'sha256:' + Array.from(
new Uint8Array(buffer)
).map(function(byte) {
return byte.toString(16).padStart(2, '0');
}).join('')
);
})
} else {
// IE and old Edge
// simply do not call the callback and skip the setup downstream
}
};
Http.prototype.addEventListener = function(e, f) {
this._events[e] = f;
const self = this;
@@ -41,6 +65,7 @@ Http.prototype.addEventListener = function(e, f) {
req.withCredentials = true;
req.hasHeader = Http.hasHeader;
req.getErrorMessage = Http.getErrorMessage;
self.oReq = req;
req.send();
} else {
f.bind(this)();

View File

@@ -17,8 +17,10 @@
var registryUI = {}
registryUI.URL_QUERY_PARAM_REGEX = /[&?]url=/;
registryUI.URL_PARAM_REGEX = /^url=/;
registryUI.showContentDigest = true;
registryUI.catalogElementsLimit = 100000;
registryUI.name = registryUI.url = function(byPassQueryParam) {
registryUI.url = function(byPassQueryParam) {
if (!registryUI._url) {
const url = registryUI.getUrlQueryParam();
if (url) {
@@ -33,6 +35,9 @@ registryUI.name = registryUI.url = function(byPassQueryParam) {
}
return registryUI._url;
}
registryUI.name = function() {
return registryUI.stripHttps(registryUI.url());
}
registryUI.getRegistryServer = function(i) {
try {
const res = JSON.parse(localStorage.getItem('registryServer'));
@@ -85,7 +90,7 @@ registryUI.removeServer = function(url) {
}
registryUI.updateHistory = function(url) {
history.pushState(null, '', (url ? '?url=' + registryUI.encodeURI(url) : '?') + window.location.hash);
registryUI.updateQueryString({ url: registryUI.encodeURI(url) })
registryUI._url = url;
}
@@ -100,10 +105,12 @@ registryUI.getUrlQueryParam = function () {
};
registryUI.encodeURI = function(url) {
if (!url) { return; }
return url.indexOf('&') < 0 ? window.encodeURIComponent(url) : btoa(url);
};
registryUI.decodeURI = function(url) {
if (!url) { return; }
return url.startsWith('http') ? window.decodeURIComponent(url) : atob(url);
};

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