Compare commits

..

6 Commits
2.0.1 ... 2.0.4

Author SHA1 Message Date
Joxit
e0ec86503a fix: can't view platform specific tag info (#198) 2021-06-24 09:31:32 +02:00
Joxit
b97ee4bc60 fix: alt-click does not work correctly with search (#196)
fixes #196
2021-06-23 20:42:48 +02:00
Joxit
a19c992d5a build: generate build for v2.0.2 2021-06-08 17:54:10 +02:00
Joxit
6c8b929e4f fix: delete button is displayed when DELETE_IMAGES is set to false
fixes #192
2021-05-20 18:49:39 +02:00
Joxit
4fcbea698b docs: update gif for 2.0 2021-05-12 18:05:40 +02:00
Joxit
999e5ae1c6 docs: more explanations for REGISTRY_URL and NGINX_PROXY_PASS_URL options 2021-05-11 10:19:15 +02:00
10 changed files with 38 additions and 16 deletions

View File

@@ -9,8 +9,6 @@ title: Docker Registry User Interface
## Overview
:warning: `joxit/docker-registry-ui:master` and `joxit/docker-registry-ui:main` tags contains unreleased v2.0.0 version!
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).
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)
@@ -81,14 +79,14 @@ Need more informations ? Try my [examples](https://github.com/Joxit/docker-regis
Some env options are available for use this interface for **only one server**.
- `REGISTRY_URL`: The default url of your docker registry. You may need CORS configuration on your registry. (default: derived from the hostname of your UI).
- `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).
- `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.
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/).
@@ -101,12 +99,12 @@ 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

View File

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

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -1,6 +1,6 @@
{
"name": "docker-registry-ui",
"version": "2.0.1",
"version": "2.0.4",
"scripts": {
"start": "ROLLUP_SERVE=true rollup -c -w",
"build": "rollup -c",

View File

@@ -44,6 +44,7 @@ export default [
dir: output,
name: 'DockerRegistryUI',
format: 'iife',
sourcemap: useServe
},
plugins: [emptyDirectories(output)].concat(
plugins,

View File

@@ -32,14 +32,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</route>
<route path="{baseRoute}taglist/(.*)">
<tag-list registry-url="{ state.registryUrl }" registry-name="{ state.name }" pull-url="{ state.pullUrl }"
image="{ router.getTagListImage() }" show-content-digest="{props.showContentDigest}"
is-image-remove-activated="{props.isImageRemoveActivated}" on-notify="{ notifySnackbar }"
image="{ router.getTagListImage() }" show-content-digest="{ truthy(props.showContentDigest) }"
is-image-remove-activated="{ truthy(props.isImageRemoveActivated) }" on-notify="{ notifySnackbar }"
filter-results="{ state.filter }" on-authentication="{ onAuthentication }"></tag-list>
</route>
<route path="{baseRoute}taghistory/(.*)">
<tag-history registry-url="{ state.registryUrl }" registry-name="{ state.name }" pull-url="{ state.pullUrl }"
image="{ router.getTagHistoryImage() }" tag="{ router.getTagHistoryTag() }"
is-image-remove-activated="{ props.isImageRemoveActivated }" on-notify="{ notifySnackbar }"
is-image-remove-activated="{ truthy(props.isImageRemoveActivated) }" on-notify="{ notifySnackbar }"
on-authentication="{ onAuthentication }"></tag-history>
</route>
</router>
@@ -76,7 +76,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import SearchBar from './search-bar.riot'
import {
stripHttps,
getRegistryServers
getRegistryServers,
truthy
} from '../scripts/utils';
import router from '../scripts/router';
@@ -164,7 +165,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
},
baseRoute: '([^#]*?)/(\\?[^#]*?)?(#!)?(/?)',
router,
version
version,
truthy
}
</script>
</docker-registry-ui>

View File

@@ -64,9 +64,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
},
onTabChanged(arch, idx) {
const state = this.state;
const {
registryUrl,
onNotify
} = this.props;
state.elements = []
state.image.variants[idx] = state.image.variants[idx] ||
new DockerImage(this.props.image, arch.digest, false, this.props.registryUrl, this.props.onNotify);
new DockerImage(this.props.image, arch.digest, {
list: false,
registryUrl,
onNotify
});
if (state.image.variants[idx].blobs) {
return this.processBlobs(state.image.variants[idx].blobs);
}

View File

@@ -143,7 +143,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
onRemoveImageHeaderChange(checked, event) {
if (event.altKey === true) {
const tags = getPage(this.props.tags, this.props.page);
tags.forEach(tag => this.state.toDelete.add(tag));
tags.filter(image => matchSearch(this.props.filterResults, image.tag))
.forEach(tag => this.state.toDelete.add(tag));
this.update({
multiDelete: true,
toDelete: this.state.toDelete

View File

@@ -172,4 +172,8 @@ export function decodeURI(url) {
return;
}
return url.startsWith('http') ? window.decodeURIComponent(url) : atob(url);
}
export function truthy(value) {
return value === true || value === "true";
}