Docker Registry User Interface

The simplest and most complete UI for your private registry!

View on GitHub

Docker Registry User Interface

Stars Pulls Sponsor Artifact Hub Version

Overview

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 or the 1.x readme

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

If you like my work and want to support it, don’t hesitate to sponsor me.

Supported Docker tags

Project Page, Live Demo, Examples, Helm Chart

preview

Hidden Features

Checkout all options in Available options section.

FAQ

Need more informations ? Try my examples or open an issue.

Available options

You can run the container with the unprivileged user nginx, see the discussion #224.

Some env options are available for use this interface for only one server (when SINGLE_REGISTRY=true).

Theme options

This featureswas added to version 2.4.0. See more about this in #283.

Environment variable light theme value dark theme value
THEME_PRIMARY_TEXT #25313b #98a8bd
THEME_NEUTRAL_TEXT #777777 #6d7fab
THEME_BACKGROUND #ffffff #22272e
THEME_HOVER_BACKGROUND #eeeeee #343a4b
THEME_ACCENT_TEXT #5f7796 #5c88ff
THEME_HEADER_TEXT #ffffff #ffffff
THEME_HEADER_ACCENT_TEXT #7b9ac2 #7ea1ff
THEME_HEADER_BACKGROUND #25313b #333a45
THEME_FOOTER_TEXT #ffffff #ffffff
THEME_FOOTER_NEUTRAL_TEXT #adbacd #98afcf
THEME_FOOTER_BACKGROUND #344251 #344251

Here is a simple usage of Docker Registry UI with Docker Registry Server using docker-compose. This example should work for most of your use case and your UI will be on the same domain as you registry.

version: '3.8'

services:
  registry-ui:
    image: joxit/docker-registry-ui:main
    restart: always
    ports:
      - 80:80
    environment:
      - SINGLE_REGISTRY=true
      - REGISTRY_TITLE=Docker Registry UI
      - DELETE_IMAGES=true
      - SHOW_CONTENT_DIGEST=true
      - NGINX_PROXY_PASS_URL=http://registry-server:5000
      - SHOW_CATALOG_NB_TAGS=true
      - CATALOG_MIN_BRANCHES=1
      - CATALOG_MAX_BRANCHES=1
      - TAGLIST_PAGE_SIZE=100
      - REGISTRY_SECURED=false
      - CATALOG_ELEMENTS_LIMIT=1000
    container_name: registry-ui

  registry-server:
    image: registry:2.8.2
    restart: always
    environment:
      REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: '[http://registry.example.com]'
      REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods: '[HEAD,GET,OPTIONS,DELETE]'
      REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials: '[true]'
      REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers: '[Authorization,Accept,Cache-Control]'
      REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers: '[Docker-Content-Digest]'
      REGISTRY_STORAGE_DELETE_ENABLED: 'true'
    volumes:
      - ./registry/data:/var/lib/registry
    container_name: registry-server

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 (you must add the protocol http/https and the port when not default 80/443):

http:
  headers:
    Access-Control-Allow-Origin: ['http://registry.example.com']
    Access-Control-Allow-Credentials: [true]
    Access-Control-Allow-Headers: ['Authorization', 'Accept', 'Cache-Control']
    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).

:warning: If you are using credential and still having issues, please read the the line about preflight requests and the bug in docker registry server in the FAQ before posting any issues.

Using delete

For deleting images, you need to activate the delete feature in the UI with DELETE_IMAGES=true and 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-Allow-Headers: ['Authorization', 'Accept', 'Cache-Control']
    Access-Control-Expose-Headers: ['Docker-Content-Digest']

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:8000']
    Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
    Access-Control-Allow-Headers: ['Authorization', 'Accept', 'Cache-Control']
    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 (not updated).

All examples