Public | Automated Build

Last pushed: 2 years ago
Short Description
A web UI for easy private/local Docker Registry integration. Allows you to browse, delete and search for images through one-to-many registries. Formally "docker-registry-web".
Full Description

Docker Registry UI

A web UI for easy private/local Docker Registry integration. Allows you to browse, delete and search for images as
well as register multiple registries for large installations.

Features

The application boasts the following features:

  • View all images for all registries (one to many)

  • Further info. page for images for inspection of config. etc

  • Pull copy/paste shortcuts

  • Delete images

  • Search for images

  • Containerized via Docker

  • Custom deployment context (e.g. /reg-ui)

  • Read only mode for preventing registry configuration changes once running

  • Stateless application

Demo

This project is containerized. You can run with docker right now by simply running:

docker run -p 8080:8080 atcol/docker-registry-ui

and browsing to localhost:8080/.

Dependencies

You need to have a running instance of docker registry that has a search backend enabled! See this issue for further information.

Statelessness

The app' requires registry configuration which can be supplied once the app's running, or through container environment
variables:

docker run -p 8080:8080 -e REG1=http://dev:5000/v1/ -e REG2=http://prod/v1/ atcol/docker-registry-ui

which will run the application and automatically register two registries at the hosts dev and prod respectively,
both running API versions v1. You must provide URLs that include the API version.

Note: don't use localhost in registry URLs! The host needs to be visible from inside the container, so -e REG1=http://localhost/... won't work because localhost will resolve to the container's IP. If registry is running on the host, then remember to use its IP: 172.17.42.1.

Volumes

The webapp's configuration data is stored inside the container in a H2 database under /var/lib/h2/. You can hold this data on the host machine using the -v flag:

docker run -p 8080:8080 -v /some/data/dir:/var/lib/h2 atcol/docker-registry-ui

which survives container restarts.

You could also use the data-container pattern using --volumes-from:

docker run -v /var/lib/h2 --name="registry_web_data" ubuntu

docker run -p 8080:8080 --volumes-from=registry_web_data atcol/docker-registry-ui

Now all data will be kept in the registry_web_data container.

Custom Deployment Context

You can deploy this container in a custom context as such:

docker run -p 80:8080 -it -e APP_CONTEXT=ui -e REG1=http://172.17.42.1:5000/v1/ atcol/docker-registry-ui

will expose the container under http://localhost/ui.

Read Only Mode

Using the container parameter -e READ_ONLY=true will enable read only mode, which prevents manipulation of the
registry configurations at runtime.

License

As of release 0.9.5, this project is licenced under GPL v3.0. See the LICENSE file.

Troubleshooting

My registry can't be found/seen by docker registry web! Help!

If you're seeing error messages like Connection to http://registry refused, make sure you've configured the port and hostname correctly. Do not set the registry hostname to localhost, because the container will resolve this to itself (127.0.0.1). If the registry instance runs on the host machine (that which runs the container), then set the registry IP/hostname to 172.17.42.1. Alternatively, you could use writable /etc/hosts as of Docker 1.2 and 'route' it that way.

Registries behind HTTPS or Ping failed: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

You need to register the CA with the container's keystore; see issue #108.

Docker Pull Command
Owner
atcol
Source Repository

Comments (13)
yiguihuo
6 months ago

Only support v1

goeckeler
2 years ago

Well, would be fun to use, but I have a 'v2' registry running. The registry is up and running, you can access it via docker command line or curl. But when I try to tell the registry ui to use that registry (either by passing the respective argument or setting it up in the UI), it says it cannot ping it, and that's it.

In the log file it says it want to "_ping" it which is not supported in v2. So any idea how your application would communicate with a registry v2 or is it a feature yet to come?

dgiglio
2 years ago

When I run a new container I get these messages:

Apr 27, 2015 10:38:16 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 27, 2015 10:38:16 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Apr 27, 2015 10:38:16 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 27, 2015 10:38:16 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Apr 27, 2015 10:38:16 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 27, 2015 10:38:16 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Apr 27, 2015 10:38:17 AM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /var/lib/tomcat7/temp

The launch command I use is:

docker run --name docker-registry-webui -p ${COREOS_PRIVATE_IPV4}:8080:8080 -v /home/core/data/webui:/var/lib/h2 -e REG1=http://192.168.111.34:5000/v1/ atcol/docker-registry-ui
atcol
3 years ago

That'll be fixed in the next release.

phynias
3 years ago

same question as @sabban why do i have to have the extra library junk in the pull request also is there anyway to have it remove the port form the pull as well.
i am using standard ports so i don't need to have the port in the pull.

sabban
3 years ago

Why is the name of the image in the UI shown with "/library/image_name"? Is there any way to omit it and keep the original name?

jivanamara
3 years ago

When I run this image, stop the container, then restart it, a file 'prodDb.lock.db' is left behind which prevents the container from starting again properly. I'm running with '-v /opt/registry-ui-data:/var/lib/h2' and have gotten around this with an upstart script that removes the file before starting the container.

eudaimos
3 years ago

@atcol - when will this image get updated to remove username/password from docker pull commands and the image list?

atcol
3 years ago

What do you mean by auth module? You can use the HTTP basic auth capabilities that Docker Registry UI supports - is that what you mean?

kingyueyang
3 years ago

I used docker-registry-ui in my docker ecosystem. And I want to add a auth module in it, Cloud you help me?