The simplest and most complete UI for your private registry
Go to file
Joxit 6b012cc8fd
fix: add default favicon for the project: X/DNA from my signature.
closes #146
2021-02-14 00:01:52 +01:00
.github ci(main): fix wrong step order... 2021-02-10 00:02:05 +01:00
bin Use entrypoint mechanism from latest nginx images (#150) 2020-10-21 23:26:05 +02:00
demo fix(fonts): add Roboto fonts in the project (#151) 2020-10-24 00:12:03 +02:00
dist build: release 1.5.2 with footer fix 2021-02-02 22:10:15 +01:00
examples chore(examples): update electron dependencies 2021-02-11 23:24:38 +01:00
nginx fix(docker): unexpected EOF errors when pulling large images (#152) 2020-10-25 01:21:55 +02:00
src fix: the footer is no more sticky to the bottom of the page 2020-12-24 22:32:01 +01:00
.dockerignore fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
.gitignore build: release 1.4.9 new options `SHOW_CONTENT_DIGEST` and `CATALOG_ELEMENTS_LIMIT` 2020-06-01 12:31:48 +02:00
CODE_OF_CONDUCT.md Add Contributor Covenant Code of Conduct 2019-09-28 22:27:52 +02:00
CONTRIBUTORS.md docs: add new example ui as proxy with read-only right 2020-11-01 23:02:16 +01:00
Dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
Dockerfile.static Add debian image version (joxit/docker-registry-ui:debian) 2018-03-18 23:58:36 +01:00
LICENSE Initial commit 2016-04-09 21:40:26 +02:00
README.md refactor: rename *.tag to *.riot and add new FAQ question 2020-12-01 00:34:10 +01:00
_config.yml chore: update project page theme 2020-08-25 00:32:45 +02:00
arm32v7-static.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
arm32v7.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
arm64v8-static.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
arm64v8.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
debian-static.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
debian.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
docker-registry-ui.gif Release v1.3.0: pagination in taglist and indent aggregated entries 2019-07-18 01:13:57 +02:00
favicon.ico fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
gulpfile.js refactor: rename *.tag to *.riot and add new FAQ question 2020-12-01 00:34:10 +01:00
index.md Update project page/README and example issue-75; rebuild project 2019-04-27 22:04:06 +02:00
package.json fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00
screenshot.png Release v1.0.0: Image aggregation and catalog UI revamped 2019-01-09 22:56:05 +01:00
static.dockerfile fix: add default favicon for the project: X/DNA from my signature. 2021-02-14 00:01:52 +01:00

README.md

title
Docker Registry User Interface

Docker Registry UI

Stars Pulls

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 (joxit/docker-registry-ui:latest) and the static interface (joxit/docker-registry-ui:static).

In the standard interface, there is no default registry, you need to add your own within the UI. With this version, you can manage more than one registry server but all the environment variables will be unavailable. All registries will be stored in the local storage 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. With this version, you can manage only one registry and all environment variables will be available.

This web user interface uses Riot the react-like user interface micro-library and riot-mui components.

Project Page, Live Demo, Examples

preview

Features

  • List all your repositories/images.
  • List all tags for a image.
  • Sort the tag list with number compatibility (see #46).
  • Use a secured docker registry.
  • Display image size (see #30).
  • Multi arch supports, Alpine and Debian based images with supports for arm32v7 and arm64v8.
  • Copy docker pull command to clipboard (see #42).
  • Show sha256 for specific tag (hover image tag).
  • Display image creation date (see #49)
  • Display image history (see #58 & #61).
  • Image aggregation (see #56).
  • Display image/tag count (see #56 issue comment).
  • Select multiple tags to delete (see #29).
  • Select all tags with ALT + Click to delete (see #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) static interface.
  • Customise docker pull command on static registry UI (see #71) static interface.
  • Add custom header via environment variable and file via NGINX_PROXY_HEADER_* (see #89) static interface
  • Show/Hide content digest in taglist via SHOW_CONTENT_DIGEST (values are: [true, false], default: true) (see #126) static interface.
  • Limit the number of elements in the image list via CATALOG_ELEMENTS_LIMIT (see #127) static interface.
  • Multi arch support in history page (see #130 and #134)

FAQ

  • What is the difference between joxit/docker-registry-ui:latest and joxit/docker-registry-ui:static tags ?
    • The latest tag was the first version of the project, one UI for many docker registries. The static tag allows you to have an interface for a single registry and also allows you select your features.
  • Why, when I delete all tags of an image, the image is still in the UI ?
    • This is a limitation of docker registry, the garbage collector don't remove empty images. If you want to delete dangling images, you will need to delete the folder in your registry data. (see #77)
  • Why the image size in the UI is not the same as displayed during docker images ?
    • The UI displays the compressed size of the image and not the extracted size version.
  • Can I use HTTPS on the UI ?
    • Yes, put your favourite reverse proxy on the front of the UI. Your reverse proxy will take care of HTTPS connection.
  • Does the UI support authentication ?
    • Yes, but it supports only basic auth. It's a simple standalone frontend, it will use your browser window for authentication.
  • Can I use the UI and docker client with an insecure registry (registry url without https) ?
    • Yes you can, you must first configure your docker client. (see #76)
  • What does Mixed Content error mean ?
    • This means you are using a UI with HTTPS and your registry is using HTTP (unsecured). When you are on a HTTPS site, you can't get HTTP content. Upgrade you registry with a HTTPS connection.
  • Why the default nginx Host is set to $http_host ?
    • This fixes the issue #88. More about this in #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).
  • Can I use the docker registry ui as a standalone application (with Electron) ?
    • Yes, check out the example here. (see #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 #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, 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 or open an issue.

Getting Started

The docker image contains the source code and nginx in order to serve the docker-registry-ui. Please remember the difference between the standard interface (latest tag) and static interface (static tags).

Run the standard interface

You can run the standard interface see the website on your 80 port. You will be able to use the interface for many registry servers, but all the configuration via environment variables from the static interface will be unavailable.

docker run -d -p 80:80 joxit/docker-registry-ui:latest

Run the static interface

Some env options are available for use this interface for only one server.

  • URL: set the static URL to use (You will need CORS configuration). Example: http://127.0.0.1:5000. (Required)
  • REGISTRY_URL: your docker registry URL to contact (CORS configuration is not needed). Example: http://my-docker-container:5000. (Can't be used with URL, since 0.3.2).
  • 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_*: Set custom headers for your docker registry, usefull when you want to add your credentials. (Can be use only with REGISTRY_URL).
  • SHOW_CONTENT_DIGEST: Show content digest in docker tag list. Default: true.
  • CATALOG_ELEMENTS_LIMIT: Limit the number of elements in the catalog page. Default: 100000.

Example with URL option.

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). Be careful, joxit/docker-registry-ui and registry:2 will communicate, both containers should be in the same network or use your private IP.

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 and docker-registry-ui as proxy here or docker-registry-ui as standalone here.

Using CORS

Your server should be configured to accept CORS.

If your docker registry does not need credentials, you will need to send this HEADER:

Access-Control-Allow-Origin: ['*']

If your docker registry need credentials, you will need to send these HEADERS:

http:
  headers:
    Access-Control-Allow-Origin: ['<your docker-registry-ui url>']
    Access-Control-Allow-Credentials: [true]
    Access-Control-Allow-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 (thank you xmontero).

Using delete

For deleting images, you need to activate the delete feature in your registry:

storage:
    delete:
      enabled: true

And you need to add these HEADERS:

http:
  headers:
    Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
    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:

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://127.0.0.1:8001']
    Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
    Access-Control-Allow-Headers: ['Authorization', 'Accept']
    Access-Control-Max-Age: [1728000]
    Access-Control-Allow-Credentials: [true]
    Access-Control-Expose-Headers: ['Docker-Content-Digest']
auth:
  htpasswd:
    realm: basic-realm
    path: /etc/docker/registry/htpasswd

Standalone Application

If you do not want to install the docker-registry-ui on your server, you may check out the Electron standalone application.

All examples