Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0ec86503a | ||
|
|
b97ee4bc60 | ||
|
|
a19c992d5a | ||
|
|
6c8b929e4f | ||
|
|
4fcbea698b | ||
|
|
999e5ae1c6 | ||
|
|
8b9efa0397 | ||
|
|
1c88ad57f8 | ||
|
|
c66887fac7 | ||
|
|
3dc035dac8 | ||
|
|
29cd2b7a8f | ||
|
|
e065298eed | ||
|
|
f02c99f12d | ||
|
|
7eed05ae50 | ||
|
|
7a35d61359 | ||
|
|
e990c39a18 | ||
|
|
3bfe107e3c | ||
|
|
0f54555b52 | ||
|
|
1ca1a1a207 | ||
|
|
bc5082dcf9 | ||
|
|
58b1486c81 | ||
|
|
2c9f006b8c | ||
|
|
026cf8ccdc | ||
|
|
69066dd867 | ||
|
|
6d4d507db5 | ||
|
|
83f15aa267 | ||
|
|
b643a44113 | ||
|
|
a2b3c592df | ||
|
|
263584fc43 | ||
|
|
1173453f72 | ||
|
|
7d095916db | ||
|
|
8ef411059c | ||
|
|
603b5861fa | ||
|
|
4ff1b2fabe | ||
|
|
e6af9321a8 | ||
|
|
bb3182d56e | ||
|
|
761a680703 | ||
|
|
926f67e1b5 | ||
|
|
781b026471 | ||
|
|
92fd78165f | ||
|
|
a3276dcb79 | ||
|
|
962592c54a | ||
|
|
669c3399d0 | ||
|
|
9c303d32c7 | ||
|
|
3d4267f5ab | ||
|
|
b3427213d0 | ||
|
|
7beac85f25 | ||
|
|
ea21483346 | ||
|
|
8fe3adf125 | ||
|
|
142727e8ac | ||
|
|
fb80283dd9 | ||
|
|
11692c136e | ||
|
|
cde932ec17 | ||
|
|
307e171ede | ||
|
|
6b012cc8fd | ||
|
|
887e77f2f1 | ||
|
|
5890b723d2 | ||
|
|
e947d2251d | ||
|
|
b427e09e84 | ||
|
|
476a96279e | ||
|
|
e5b0d5d756 | ||
|
|
2337a06db6 | ||
|
|
8c613701d3 | ||
|
|
1bad64443d | ||
|
|
ef3a9795cf | ||
|
|
99ea6cf1d8 | ||
|
|
ccd349b7d5 | ||
|
|
d87cd44a00 | ||
|
|
b8802ef7ab | ||
|
|
e6c20afcf3 | ||
|
|
1220825f31 | ||
|
|
501d0d72a0 | ||
|
|
be813e6617 | ||
|
|
b4e6369a71 | ||
|
|
c9ede6fe61 | ||
|
|
656914f0d7 | ||
|
|
f8c5010fd1 | ||
|
|
42f19fcef7 | ||
|
|
f9620639bf | ||
|
|
d1700ccf74 | ||
|
|
991eaf932d | ||
|
|
e2ee319d4a | ||
|
|
06d6293e79 | ||
|
|
00fe443a7c | ||
|
|
6e7fc1508e | ||
|
|
178cd5a59d | ||
|
|
da9591609e | ||
|
|
f0a40d6087 | ||
|
|
01d8bcfccd | ||
|
|
c60c2f3e95 | ||
|
|
241ee0fd13 |
@@ -4,4 +4,5 @@
|
||||
!nginx
|
||||
!src
|
||||
!package.json
|
||||
!gulpfile.js
|
||||
!gulpfile.js
|
||||
!favicon.ico
|
||||
44
.github/workflows/main.yml
vendored
Normal 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
@@ -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
@@ -3,4 +3,6 @@ node_modules
|
||||
package-lock.json
|
||||
registry-data
|
||||
.idea
|
||||
_site
|
||||
_site
|
||||
*.orig
|
||||
.serve/
|
||||
|
||||
@@ -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)
|
||||
19
Dockerfile
@@ -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/
|
||||
@@ -1 +0,0 @@
|
||||
static.dockerfile
|
||||
182
README.md
@@ -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)
|
||||
|
||||

|
||||

|
||||
|
||||
## 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))
|
||||
|
||||
@@ -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: ""
|
||||
|
||||
@@ -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
|
||||
@@ -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/
|
||||
|
||||
@@ -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
|
||||
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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/
|
||||
|
||||
@@ -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
20
dist/docker-registry-ui.js
vendored
Normal file
BIN
dist/fonts/Roboto-Bold.ttf
vendored
Normal file
BIN
dist/fonts/Roboto-Bold.woff
vendored
Normal file
BIN
dist/fonts/Roboto-Bold.woff2
vendored
Normal file
BIN
dist/fonts/Roboto-Light.ttf
vendored
Normal file
BIN
dist/fonts/Roboto-Light.woff
vendored
Normal file
BIN
dist/fonts/Roboto-Light.woff2
vendored
Normal file
BIN
dist/fonts/Roboto-Regular.eot
vendored
Normal file
BIN
dist/fonts/Roboto-Regular.ttf
vendored
Normal file
BIN
dist/fonts/Roboto-Regular.woff
vendored
Normal file
BIN
dist/fonts/Roboto-Regular.woff2
vendored
Normal file
BIN
dist/fonts/RobotoMono-Regular.eot
vendored
Normal file
BIN
dist/fonts/RobotoMono-Regular.ttf
vendored
Normal file
BIN
dist/fonts/RobotoMono-Regular.woff
vendored
Normal file
BIN
dist/fonts/RobotoMono-Regular.woff2
vendored
Normal file
2
dist/images/docker-logo.svg
vendored
@@ -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
@@ -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>
|
||||
18
dist/scripts/docker-registry-ui-static.js
vendored
18
dist/scripts/docker-registry-ui.js
vendored
5
dist/scripts/vendor.js
vendored
18
dist/style.css
vendored
1
dist/vendor.css
vendored
|
Before Width: | Height: | Size: 686 KiB After Width: | Height: | Size: 1.2 MiB |
@@ -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
@@ -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
|
||||
57
examples/electron/README.md
Normal 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.
|
||||
|
||||

|
||||
|
||||
|
||||
## 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```
|
||||
|
||||
|
||||
8
examples/electron/authentication/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="index.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
211
examples/electron/authentication/index.tsx
Normal 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();
|
||||
}
|
||||
|
||||
BIN
examples/electron/doc/assets/authentication.gif
Normal file
|
After Width: | Height: | Size: 450 KiB |
229
examples/electron/index.js
Normal 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();
|
||||
});
|
||||
39
examples/electron/package.json
Normal 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"
|
||||
}
|
||||
@@ -63,7 +63,7 @@ registry:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: registry
|
||||
tag: 2.6.2
|
||||
tag: 2.7.1
|
||||
pullPolicy: Always
|
||||
probe:
|
||||
liveness: true
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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']
|
||||
|
||||
10
examples/read-only-auth/README.md
Normal 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`.
|
||||
27
examples/read-only-auth/docker-compose.yml
Normal 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:
|
||||
55
examples/read-only-auth/nginx.conf
Normal 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;
|
||||
#}
|
||||
}
|
||||
2
examples/read-only-auth/read-only.htpasswd
Normal file
@@ -0,0 +1,2 @@
|
||||
read:$2y$05$NHpWy4HuCM8Ol2wZJsf6/.cJtGgv61jWzHTCYt/WntzRLDse1IuVO
|
||||
write:$2y$05$aqLmS1hXojRnubpSN4aVDeZ8wLhJtmQr4v0NiZl4KHUHXhDVnyoQm
|
||||
1
examples/read-only-auth/read-write.htpasswd
Normal file
@@ -0,0 +1 @@
|
||||
write:$2y$05$aqLmS1hXojRnubpSN4aVDeZ8wLhJtmQr4v0NiZl4KHUHXhDVnyoQm
|
||||
21
examples/read-only-auth/registry.yml
Normal 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']
|
||||
2
examples/token-auth-keycloak/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
data/registry/
|
||||
data/keycloak/
|
||||
137
examples/token-auth-keycloak/README.md
Normal 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/).
|
||||
|
||||

|
||||
|
||||
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 client’s authorized access.
|
||||
5. The **docker registry ui** retries the original request with the Bearer token embedded in the request’s 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`.
|
||||
|
||||

|
||||
|
||||
Sign in with your login and password (in my example it's `admin` and `password`).
|
||||
|
||||

|
||||
|
||||
Go to `Clients` in the left side menu.
|
||||
|
||||

|
||||
|
||||
Create a new client.
|
||||
|
||||

|
||||
|
||||
Enter a name for `Client ID`, choose `docker-v2` as the `Client Protocol`, and click `Save`.
|
||||
|
||||

|
||||
|
||||
Navigate to `Installation` tab, choose `Docker Compose YAML` as `Format Option` and click `Download`
|
||||
|
||||

|
||||
|
||||
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
|
||||
```
|
||||
78
examples/token-auth-keycloak/conf/proxy/nginx.conf
Normal 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;
|
||||
#}
|
||||
}
|
||||
27
examples/token-auth-keycloak/conf/registry/config.yml
Normal 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
|
||||
16
examples/token-auth-keycloak/conf/registry/localhost.crt
Normal 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-----
|
||||
28
examples/token-auth-keycloak/conf/registry/localhost.key
Normal 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-----
|
||||
@@ -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-----
|
||||
@@ -0,0 +1 @@
|
||||
cc04bebe-cb07-4384-b886-3670f757fd2e
|
||||
BIN
examples/token-auth-keycloak/data/keycloak/keycloak.mv.db
Normal file
163
examples/token-auth-keycloak/data/keycloak/keycloak.trace.db
Normal 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)
|
||||
41
examples/token-auth-keycloak/docker-compose.yml
Normal 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:
|
||||
BIN
examples/token-auth-keycloak/images/01-keycloak-home.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
examples/token-auth-keycloak/images/02-keycloak-signin.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
examples/token-auth-keycloak/images/03-keycloak-to-clients.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 72 KiB |
BIN
examples/token-auth-keycloak/images/05-keycloak-new-client.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
examples/token-auth-keycloak/images/06-keycloak-download.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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']
|
||||
|
||||
@@ -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']
|
||||