Giter VIP home page Giter VIP logo

klausmeyer / docker-registry-browser Goto Github PK

View Code? Open in Web Editor NEW
439.0 8.0 49.0 2.73 MB

🐳 Web Interface for the Docker Registry HTTP API V2 written in Ruby on Rails.

Home Page: https://hub.docker.com/r/klausmeyer/docker-registry-browser/

License: MIT License

Ruby 69.75% JavaScript 3.13% HTML 24.92% Dockerfile 0.98% SCSS 0.81% Shell 0.41%
docker docker-registry ruby rails user-interface web-app

docker-registry-browser's Introduction

Docker Registry Browser

Web Interface for the Docker Registry HTTP API V2 written in Ruby on Rails.

Screenshots

Repositories overview

Screenshot 1

Tag overview

Screenshot 2

Tag details

Screenshot 3

Delete tag

Screenshot 4

Usage

Please have a look at the Documentation for more details and available configuration options.

Docker

$ docker run --name registry-browser -p 8080:8080 klausmeyer/docker-registry-browser

Kubernetes (Helm)

A helm-chart is available at klausmeyer/helm-charts.

Licence

The application is available as open source under the terms of the MIT License.

docker-registry-browser's People

Contributors

adrianpietka avatar chhe avatar craigminihan avatar dannydulai avatar dennismeissel avatar dependabot[bot] avatar depfu[bot] avatar francislavoie avatar gabrielcc avatar gragib avatar iamjpotts avatar inakimalerba avatar jmlagace avatar johan-smits avatar klausmeyer avatar mnorrsken avatar neumayr avatar sepich avatar willhoyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-registry-browser's Issues

Reverse Proxy "subpath" request

Hi,

i am running the registry browser behind a nginx reverse proxy (to follow the architecture, do TLS & auth). Sadly i can not pass through on a dedicated port so i have to use a shared domain like admin.mybox.com and rely on the routes like admin.mybox.com/jenkins or admin.mybox.com/registry-browser/

I am pretty sure i set everything so it should work as expected but once i hit the route for docker-registry-browser, i immideately get a redirect (301) to "wrong" route like:
admin.mybox.com/repo/ which is not redirected within nginx.

For most tools i've seen yet, i need to tell them the route they run within, since they expect to run at /.

Could you please add config option for the route/path the secript wiil run under so the redirects will not fire into nowhere ? I know this might be an edgy one but i hope it will also not be a big one to fix -D

cheers
Mike

Not able to delete tags

Hi,

When I press Delete Tag button, tag is not deleted, instead it shows this message:

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

The log says:

I, [2019-02-15T12:15:15.740060 #1]  INFO -- request: DELETE http://192.168.2.82:5000/v2/joseluis/alpine/manifests/sha256:1502b120cb36cd2b3dbd680fab778c31d535dc049b7a522fbd2f89242d4b4f29
D, [2019-02-15T12:15:15.740571 #1] DEBUG -- request: User-Agent: "Faraday v0.15.4"
I, [2019-02-15T12:15:15.745571 #1]  INFO -- : [23107d62-eb8d-4d83-aaa2-7b827156a5d2] Completed 500 Internal Server Error in 66ms
F, [2019-02-15T12:15:15.746876 #1] FATAL -- : [23107d62-eb8d-4d83-aaa2-7b827156a5d2]   
F, [2019-02-15T12:15:15.747364 #1] FATAL -- : [23107d62-eb8d-4d83-aaa2-7b827156a5d2] Faraday::ClientError (the server responded with status 405):
F, [2019-02-15T12:15:15.747672 #1] FATAL -- : [23107d62-eb8d-4d83-aaa2-7b827156a5d2]   
F, [2019-02-15T12:15:15.747986 #1] FATAL -- : [23107d62-eb8d-4d83-aaa2-7b827156a5d2] app/models/tag.rb:37:in `delete'
[23107d62-eb8d-4d83-aaa2-7b827156a5d2] app/controllers/tags_controller.rb:10:in `destroy'

Thank you,

Sorting tags for images

Currently, it seems like the tags are some sort of reversed order based on the tag name itself. Is there any way to sort based on created date or other criteria? It would be really helpful to be able to view the newest and oldest tags.

Thanks! Really liking this solution more than others 😄

Delete not working behind proxy

I've set up my registry and registry-browser behind haproxy (docker-flow-proxy) and I am terminating ssl on the proxy (and validating a client certificate) it works just fine except when deleting tags. I get the following message in the browser:

"The change you wanted was rejected."

In the server logs I see:

I, [2017-05-16T14:05:02.607865 #5]  INFO -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] Started DELETE "/repo/plugins/docker/tag/latest" for 10.0.1.18 at 2017-05-16 14:05:02 +0000
I, [2017-05-16T14:05:02.617338 #5]  INFO -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] Processing by TagsController#destroy as HTML
I, [2017-05-16T14:05:02.618123 #5]  INFO -- : [0da81994-4c18-40cb-bff5-d4280fb424fc]   Parameters: {"authenticity_token"=>"oVjTT0S2RrXg6jd6mHQrlUY476dTkw1Lf2A7rxWMrlV8bzCkEGxuzOxYit28oob4mR/UTizh96UG3jSYG88i5A==", "repo"=>"plugins/docker", "tag"=>"latest"}
W, [2017-05-16T14:05:02.620435 #5]  WARN -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] HTTP Origin header (https://registry-browser.mydomain.io) didn't match request.base_url (http://registry-browser.mydomain.io)
I, [2017-05-16T14:05:02.621991 #5]  INFO -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] Completed 422 Unprocessable Entity in 3ms
F, [2017-05-16T14:05:02.629045 #5] FATAL -- : [0da81994-4c18-40cb-bff5-d4280fb424fc]   
F, [2017-05-16T14:05:02.629414 #5] FATAL -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
F, [2017-05-16T14:05:02.629778 #5] FATAL -- : [0da81994-4c18-40cb-bff5-d4280fb424fc]   
F, [2017-05-16T14:05:02.630538 #5] FATAL -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] actionpack (5.1.1) lib/action_controller/metal/request_forgery_protection.rb:195:in `handle_unverified_request'

This is the segment from my docker-compose.yml:

  registry-browser:
    image: klausmeyer/docker-registry-browser
    environment:
      - DOCKER_REGISTRY_URL=http://registry:5000
      - ENABLE_DELETE_IMAGES=true
      - NO_SSL_VERIFICATION=true
    deploy:
      labels:
        - com.df.notify=true
        - com.df.serviceDomain=registry-browser.mydomain.io
        - com.df.port=8080
        - com.df.distribute=true
        - com.df.httpsOnly=true
        - com.df.verifyClientSsl=true
    networks:
      - proxy

I'm guessing that this is rooted in this line from the logs:

W, [2017-05-16T14:05:02.620435 #5]  WARN -- : [0da81994-4c18-40cb-bff5-d4280fb424fc] HTTP Origin header (https://registry-browser.mydomain.io) didn't match request.base_url (http://registry-browser.mydomain.io)

Do I need to do some additional header rewriting, and should I need to (I've not needed to for other services)?

Traefik Reverse Proxy repo/ redirect

I'm getting a redirect error when trying to run the app behind a Traefik reverse proxy. I've read #303 and #179 and have had no luck in figuring this out.

When I access http://docker-registry-browser/docker, I get redirected to http://docker-registry-browser/repo/docker, which 404s

I'm setting the RAILS_RELATIVE_URL_ROOT and SCRIPT_NAME environment vars to my desired subpath:

environment:
      DOCKER_REGISTRY_URL: ***
      RAILS_RELATIVE_URL_ROOT: /docker
      SCRIPT_NAME: /docker

And have my reverse proxy listening on the /docker/ path

deploy:
     labels:
       ...
       - "traefik.http.routers.docker-registry-browser.rule=Host(`docker-registry-browser`) && PathPrefix(`/docker/`)"

I acknowledge that this is most likely an issue with my Traefik configuration, but where is the /repo/ path coming from? Without any subpath configuration, it is not a part of the resolved URL, which loads the app correctly.

Support for authentication against browser

While i really like your browser, what i'm missing is some way to add a password (basic auth is ok) for the browser frontend.

Sure i could put "something" in front of the browser, but this would mean, yet another docker container :)

i'm also happy with just using the regular registry user+password. So either:

  1. Use the same ENV params for browser auth

or

  1. "relay" 401 http response + auth headers. So i dont set the env param for basic auth. browser tries to auth with registry, it fails with 401, so it returns the 401+authentication header back to my "web-browser". My "web-browser" handles the error (by showing a basic auth alert), on the second request my "web-browser" then sends the authentication header which then needs to be relayed to registry I prefer this variant.

Subfolder deploy goes into redirect loop.

I'm trying subfolder deploy in accordance with README.md.

docker run --name registry-browser
  -p 8081:8080
  -e DOCKER_REGISTRY_URL=http://***.***.***.***:5000
  -e RAILS_RELATIVE_URL_ROOT=/registry-browser \
  -e SCRIPT_NAME=/registry-browser \
   klausmeyer/docker-registry-browser:1.3.4 

But, when I access on web browser (Chrome), I face redirect loop.
URL bar shows as below.

***.***.***.***:8081/registry-browser/repo/registry-browser/repo/registry-browser/repo/registry-browser/repo/registry-browser/repo

Is subfolder deploy available on v1.3.4 ? Is there any other things I have to add ?
I would appreciate if someone help me resolving this issue.

! Unable to load application: LoadError: Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile

I ran into the message in the subject and googled a bit and found: https://stackoverflow.com/questions/38663706/loaderror-could-not-load-the-listen-gem-rails-5?answertab=votes#tab-top

diff --git a/config/environments/development.rb b/config/environments/development.rb
index af1183f..72f1661 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -55,5 +55,5 @@ Rails.application.configure do

   # Use an evented file watcher to asynchronously detect changes in source code,
   # routes, locales, etc. This feature depends on the listen gem.
-  config.file_watcher = ActiveSupport::EventedFileUpdateChecker
+  # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
 end

And that fixed my problem. Please have a look at that. Thanks

Cannot resolve DNS hostname of registry from docker-registry-browser

I'm having to use hard-coded IP address of my docker registry as the FQDN seems to cause issues with this container.

Registry URL: https://registry.myhost.local:5001

When browsing the docker-registry-browser the front page loads fine and lists all my images, however upon clicking the image, the page errors, and the following is shown in the logs:

F, [2017-12-21T00:16:21.047264 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88]
F, [2017-12-21T00:16:21.047315 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88] Faraday::ConnectionFailed (Failed to open TCP connection to registry.myhost.local:5001 (getaddrinfo: Name does not resolve)):
F, [2017-12-21T00:16:21.047356 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88]
F, [2017-12-21T00:16:21.047483 #7] FATAL -- : [2f75f589-a26a-4ae1-87b0-85442b7b0d88] app/models/repository.rb:7:in `list'
  • The docker host can resolve the address fine from command line.
  • The container itself must be able to resolve since the initial page loaded my images fine, it's only after clicking on an image name to browse it is when it fails.
  • From WITHIN the container, a ping is successful:
/app # ping registry.myhost.local
PING registry.myhost.local (10.1.5.22): 56 data bytes
64 bytes from 10.1.5.22: seq=0 ttl=64 time=0.049 ms

The error on the web page just states:
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

Delete button doesn't work (not active)

Started app in docker with all necessary parameters:

docker run --name registry-browser -it --rm -p 8080:8080 -e DOCKER_REGISTRY_URL=https://myserver.com-e BASIC_AUTH_USER=user -e BASIC_AUTH_PASSWORD=secret -e ENABLE_DELETE_IMAGES=true klausmeyer/docker-registry-browser

Delete button is inactive after entering image tag.

Tag page works only for "latest"

Hi,
I can't access tag detail page with url like this: /repo/xxx/yyy/tag/1.4.2, but it works for /repo/xxx/yyy/tag/latest.

Is it a known bug ?

Delete Tag button doesn't exits

Hello,

Delete Tag button doesn't exits in version 1.0.1 (b9a6953) Running on Ruby 2.6.1 and Rails 5.2.2

I have docker with command
docker run --name registry-browser --rm --detach -it -p 8080:8080 -e DOCKER_REGISTRY_URL=http://192.168.2.82:5000 klausmeyer/docker-registry-browser

unable to set listening interface

Since I want to run docker-registry-browser via nginx as a reverse proxy, I'd like to run it only 127.0.0.1 but I can't find the env variable to configure that.

How can I set that? Thanks!

Unable to delete a tag using the UI

First I run the Docker server with this command:

$ docker run \
  -p 5000:5000 \
  registry:2

Next I run the browser with this command:

$ docker run \
  --name registry-browser \
  -it --rm \
  -p 8080:8080 \
  -e DOCKER_REGISTRY_URL=http://<LOCAL_IP>:5000 \
  -e ENABLE_DELETE_IMAGES=true \
  klausmeyer/docker-registry-browser

This is using the currently untagged latest image.

I push an image to the Docker server, then browse around the UI, then I use the UI to trigger a deletion of the tag. When that happens, I get the following failure printed by the UI:

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

The browser error logs look like this:

I, [2020-03-06T06:15:22.443890 #1]  INFO -- : [1deb24e3-865f-49bf-8e8e-e966d6993bcb] Started DELETE "/repo/tlhunter/recipe-api/tag/v0.0.3" for 172.17.0.1 at 2020-03-06 06:15:22 +0000
I, [2020-03-06T06:15:22.444434 #1]  INFO -- : [1deb24e3-865f-49bf-8e8e-e966d6993bcb] Processing by TagsController#destroy as HTML
I, [2020-03-06T06:15:22.444486 #1]  INFO -- : [1deb24e3-865f-49bf-8e8e-e966d6993bcb]   Parameters: {"authenticity_token"=>"CfuMV0HP7NzI90CWFYU+teO8TFKEc67ecECIS4ocOu+eMimH06CcyD84q8jcohYIty+P0y0hXIJ38adiOkhkFA==", "repo"=>"tlhunter/recipe-api", "tag"=>"v0.0.3"}
I, [2020-03-06T06:15:22.445382 #1]  INFO -- request: GET http://192.168.2.234:5000/v2/tlhunter/recipe-api/tags/list
D, [2020-03-06T06:15:22.445419 #1] DEBUG -- request: User-Agent: "Faraday v0.17.3"
I, [2020-03-06T06:15:22.447625 #1]  INFO -- response: Status 200
D, [2020-03-06T06:15:22.447690 #1] DEBUG -- response: content-type: "application/json; charset=utf-8"
docker-distribution-api-version: "registry/2.0"
x-content-type-options: "nosniff"
date: "Fri, 06 Mar 2020 06:15:22 GMT"
content-length: "67"
connection: "close"
I, [2020-03-06T06:15:22.448312 #1]  INFO -- request: GET http://192.168.2.234:5000/v2/tlhunter/recipe-api/manifests/v0.0.3
D, [2020-03-06T06:15:22.448411 #1] DEBUG -- request: User-Agent: "Faraday v0.17.3"
Accept: "application/vnd.docker.distribution.manifest.v2+json"
I, [2020-03-06T06:15:22.450816 #1]  INFO -- response: Status 200
D, [2020-03-06T06:15:22.450880 #1] DEBUG -- response: content-length: "1161"
content-type: "application/vnd.docker.distribution.manifest.v2+json"
docker-content-digest: "sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8"
docker-distribution-api-version: "registry/2.0"
etag: "\"sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8\""
x-content-type-options: "nosniff"
date: "Fri, 06 Mar 2020 06:15:22 GMT"
connection: "close"
I, [2020-03-06T06:15:22.451495 #1]  INFO -- request: GET http://192.168.2.234:5000/v2/tlhunter/recipe-api/blobs/sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b
D, [2020-03-06T06:15:22.451536 #1] DEBUG -- request: User-Agent: "Faraday v0.17.3"
I, [2020-03-06T06:15:22.454501 #1]  INFO -- response: Status 200
D, [2020-03-06T06:15:22.454568 #1] DEBUG -- response: accept-ranges: "bytes"
cache-control: "max-age=31536000"
content-length: "3611"
content-type: "application/octet-stream"
docker-content-digest: "sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b"
docker-distribution-api-version: "registry/2.0"
etag: "\"sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b\""
x-content-type-options: "nosniff"
date: "Fri, 06 Mar 2020 06:15:22 GMT"
connection: "close"
I, [2020-03-06T06:15:22.455892 #1]  INFO -- request: DELETE http://192.168.2.234:5000/v2/tlhunter/recipe-api/manifests/sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8
D, [2020-03-06T06:15:22.455949 #1] DEBUG -- request: User-Agent: "Faraday v0.17.3"
I, [2020-03-06T06:15:22.458356 #1]  INFO -- : [1deb24e3-865f-49bf-8e8e-e966d6993bcb] Completed 500 Internal Server Error in 14ms (Allocations: 4549)
F, [2020-03-06T06:15:22.458832 #1] FATAL -- : [1deb24e3-865f-49bf-8e8e-e966d6993bcb]   
[1deb24e3-865f-49bf-8e8e-e966d6993bcb] Faraday::ClientError (the server responded with status 405):
[1deb24e3-865f-49bf-8e8e-e966d6993bcb]   
[1deb24e3-865f-49bf-8e8e-e966d6993bcb] app/models/tag.rb:59:in `delete'
[1deb24e3-865f-49bf-8e8e-e966d6993bcb] app/controllers/tags_controller.rb:10:in `destroy'

The Docker server error logs look like this:

time="2020-03-06T06:12:21.578678568Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=1c4b5032-1d13-4340-974f-830928191e2e http.request.method=GET http.request.remoteaddr="172.17.0.1:55504" http.request.uri="/v2/tlhunter/recipe-api/tags/list" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.866582ms http.response.status=200 http.response.written=67 
172.17.0.1 - - [06/Mar/2020:06:12:21 +0000] "GET /v2/tlhunter/recipe-api/tags/list HTTP/1.1" 200 67 "" "Faraday v0.17.3"
time="2020-03-06T06:12:21.582053042Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=698afd9e-4745-45e3-95c4-2b0ff38af3fd http.request.method=GET http.request.remoteaddr="172.17.0.1:55508" http.request.uri="/v2/tlhunter/recipe-api/manifests/v0.0.3" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.response.duration=1.256827ms http.response.status=200 http.response.written=1161 
172.17.0.1 - - [06/Mar/2020:06:12:21 +0000] "GET /v2/tlhunter/recipe-api/manifests/v0.0.3 HTTP/1.1" 200 1161 "" "Faraday v0.17.3"
time="2020-03-06T06:12:21.587534562Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=1db258ff-3709-431a-9148-7cbad0861dcb http.request.method=GET http.request.remoteaddr="172.17.0.1:55512" http.request.uri="/v2/tlhunter/recipe-api/blobs/sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/octet-stream" http.response.duration=3.258145ms http.response.status=200 http.response.written=3611 
172.17.0.1 - - [06/Mar/2020:06:12:21 +0000] "GET /v2/tlhunter/recipe-api/blobs/sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b HTTP/1.1" 200 3611 "" "Faraday v0.17.3"
time="2020-03-06T06:12:21.592658657Z" level=error msg="response completed with error" err.code=unsupported err.message="The operation is unsupported." go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=c9a24dae-ccd5-4cf8-b788-f3148686845c http.request.method=DELETE http.request.remoteaddr="172.17.0.1:55516" http.request.uri="/v2/tlhunter/recipe-api/manifests/sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.219531ms http.response.status=405 http.response.written=78 vars.name="tlhunter/recipe-api" vars.reference="sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8" 
172.17.0.1 - - [06/Mar/2020:06:12:21 +0000] "DELETE /v2/tlhunter/recipe-api/manifests/sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8 HTTP/1.1" 405 78 "" "Faraday v0.17.3"
^[[5~172.17.0.1 - - [06/Mar/2020:06:15:22 +0000] "GET /v2/tlhunter/recipe-api/tags/list HTTP/1.1" 200 67 "" "Faraday v0.17.3"
time="2020-03-06T06:15:22.447104094Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=59eabe42-1f7c-4299-96ec-8f47bff7ba5f http.request.method=GET http.request.remoteaddr="172.17.0.1:55560" http.request.uri="/v2/tlhunter/recipe-api/tags/list" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.073245ms http.response.status=200 http.response.written=67 
172.17.0.1 - - [06/Mar/2020:06:15:22 +0000] "GET /v2/tlhunter/recipe-api/manifests/v0.0.3 HTTP/1.1" 200 1161 "" "Faraday v0.17.3"
time="2020-03-06T06:15:22.450158628Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=2537d9df-5fb4-4919-9341-a3426e71091a http.request.method=GET http.request.remoteaddr="172.17.0.1:55564" http.request.uri="/v2/tlhunter/recipe-api/manifests/v0.0.3" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.response.duration=1.099761ms http.response.status=200 http.response.written=1161 
time="2020-03-06T06:15:22.453791802Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=00e396ce-e989-42cb-8ed8-fe5378de8508 http.request.method=GET http.request.remoteaddr="172.17.0.1:55568" http.request.uri="/v2/tlhunter/recipe-api/blobs/sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/octet-stream" http.response.duration=1.479332ms http.response.status=200 http.response.written=3611 
172.17.0.1 - - [06/Mar/2020:06:15:22 +0000] "GET /v2/tlhunter/recipe-api/blobs/sha256:12d0c7e379355f84e8af419b0657e4f4118c5b8cb81d1942cd535dd6bb9e6f3b HTTP/1.1" 200 3611 "" "Faraday v0.17.3"
time="2020-03-06T06:15:22.457580934Z" level=error msg="response completed with error" err.code=unsupported err.message="The operation is unsupported." go.version=go1.11.2 http.request.host="192.168.2.234:5000" http.request.id=cc4abbae-1479-4e96-8992-96ec6a532b48 http.request.method=DELETE http.request.remoteaddr="172.17.0.1:55572" http.request.uri="/v2/tlhunter/recipe-api/manifests/sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8" http.request.useragent="Faraday v0.17.3" http.response.contenttype="application/json; charset=utf-8" http.response.duration=1.101648ms http.response.status=405 http.response.written=78 vars.name="tlhunter/recipe-api" vars.reference="sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8" 
172.17.0.1 - - [06/Mar/2020:06:15:22 +0000] "DELETE /v2/tlhunter/recipe-api/manifests/sha256:0c535692e66d91e69744a2ac4b4c698dbd7694522be448bc40c4f83dae3dedb8 HTTP/1.1" 405 78 "" "Faraday v0.17.3"

config/puma.rb:44:in `_load_from': uninitialized constant #<Class:#<Puma::DSL:0x0...>>::Rails (NameError)

JoachimVeulemans@SYNO1:~$ sudo docker run klausmeyer/docker-registry-browser
config/puma.rb:44:in `_load_from': uninitialized constant #<Class:#<Puma::DSL:0x0000562222a3a058>>::Rails (NameError)
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/dsl.rb:46:in `instance_eval'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/dsl.rb:46:in `_load_from'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/configuration.rb:195:in `block in load'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/configuration.rb:195:in `each'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/configuration.rb:195:in `load'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/launcher.rb:58:in `initialize'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/cli.rb:71:in `new'
        from /usr/local/bundle/gems/puma-4.3.3/lib/puma/cli.rb:71:in `initialize'
        from /usr/local/bundle/gems/puma-4.3.3/bin/puma:8:in `new'
        from /usr/local/bundle/gems/puma-4.3.3/bin/puma:8:in `<top (required)>'
        from /usr/local/bundle/bin/puma:23:in `load'
        from /usr/local/bundle/bin/puma:23:in `<main>'

Did a pull before so image is up to date. Worked before last update of tag 'latest'.

Thanks in advance

Add http to https redirection

Hi!

It would be very nice to add an option to automatically redirect http traffic to https. So when an user type http://MY_URL:8100, he/she will be redirected to https://MY_URL:8105

Thanks!

Arm64 images

Not really an issue, just an FYI: I was able to build the image for arm64 from your source without modification. I built it using the docker buildx. The image is in docker hub at thejimnicholson/docker-registry-browser. I don't know if docker's github builder supports multiarch images, but it wouldn't be hard to make one using buildx that could be used on multiple platforms.

Add creation date to Tag

First off, this Registry Browser is perfect to list all images easily and deleting them as well. Makes things so much easier than using the command line ;) Thanks for all the work done!

One thing that would be really helpful is to add the Tag creation date in the list page and detail page. That way we can identify old tags and delete them accordingly.

unable to get local issuer certificate

Hello, I get the following error message:

Faraday::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)):

Probably if the app wants to log on to my registry ...

How can I add my own ca.crt?

Tag don't deleted

When I try to delete an image tag, I get an error:
https://prnt.sc/knd2nt

command to start the image:

docker run -d --name registry-browser -it -p 8000:8080 -e DOCKER_REGISTRY_URL=http://172.20.143.141:30005 -e BASIC_AUTH_USER=dockeruser -e BASIC_AUTH_PASSWORD=<password> -e ENABLE_DELETE_IMAGES=true klausmeyer/docker-registry-browser

in container logs:

I, [2018-08-27T11:17:19.015339 #5]  INFO -- request: GET http://172.20.143.141:30005/v2/image/tags/list
D, [2018-08-27T11:17:19.015446 #5] DEBUG -- request: User-Agent: "Faraday v0.15.2"
Authorization: "Basic ZG9ja2VydXNlcjoxcWF6MndzeA=="
I, [2018-08-27T11:17:19.035075 #5]  INFO -- response: Status 200
D, [2018-08-27T11:17:19.035170 #5] DEBUG -- response: content-type: "application/json; charset=utf-8"
docker-distribution-api-version: "registry/2.0"
x-content-type-options: "nosniff"
date: "Mon, 27 Aug 2018 11:17:19 GMT"
content-length: "161"
connection: "close"
I, [2018-08-27T11:17:19.035689 #5]  INFO -- request: GET http://172.20.143.141:30005/v2/image/manifests/dev-0.2.8-ui-transaction
D, [2018-08-27T11:17:19.035745 #5] DEBUG -- request: User-Agent: "Faraday v0.15.2"
Accept: "application/vnd.docker.distribution.manifest.v2+json"
Authorization: "Basic ZG9ja2VydXNlcjoxcWF6MndzeA=="
I, [2018-08-27T11:17:19.055439 #5]  INFO -- response: Status 200
D, [2018-08-27T11:17:19.055504 #5] DEBUG -- response: content-length: "1366"
content-type: "application/vnd.docker.distribution.manifest.v2+json"
docker-content-digest: "sha256:cc9a7550b0fa3d135a6570361e478f1cfd5a9b0dd39fdd0beb96f24d58fd4ff4"
docker-distribution-api-version: "registry/2.0"
etag: "\"sha256:cc9a7550b0fa3d135a6570361e478f1cfd5a9b0dd39fdd0beb96f24d58fd4ff4\""
x-content-type-options: "nosniff"
date: "Mon, 27 Aug 2018 11:17:19 GMT"
connection: "close"
I, [2018-08-27T11:17:19.055994 #5]  INFO -- request: DELETE http://172.20.143.141:30005/v2/image/manifests/sha256:cc9a7550b0fa3d135a6570361e478f1cfd5a9b0dd39fdd0beb96f24d58fd4ff4
D, [2018-08-27T11:17:19.056039 #5] DEBUG -- request: User-Agent: "Faraday v0.15.2"
Authorization: "Basic ZG9ja2VydXNlcjoxcWF6MndzeA=="
I, [2018-08-27T11:17:19.064130 #5]  INFO -- : [fcb3c127-bde7-47cd-a039-987da757eb97] Completed 500 Internal Server Error in 50ms
F, [2018-08-27T11:17:19.064930 #5] FATAL -- : [fcb3c127-bde7-47cd-a039-987da757eb97]
F, [2018-08-27T11:17:19.064981 #5] FATAL -- : [fcb3c127-bde7-47cd-a039-987da757eb97] Faraday::ClientError (the server responded with status 405):
F, [2018-08-27T11:17:19.065005 #5] FATAL -- : [fcb3c127-bde7-47cd-a039-987da757eb97]
F, [2018-08-27T11:17:19.065027 #5] FATAL -- : [fcb3c127-bde7-47cd-a039-987da757eb97] app/models/tag.rb:37:in `delete'
[fcb3c127-bde7-47cd-a039-987da757eb97] app/controllers/tags_controller.rb:10:in `destroy'

Redirect from Azure Container Registry causes JSON parser fail

I've pointed a docker-registry-browser 1.3.0 instance at Azure Container Registry (ACR) and get a We're sorry, but something went wrong. in the UI when clicking on an image tag.

The log shows:

access-control-expose-headers: "Docker-Content-Digest, WWW-Authenticate, Link, X-Ms-Correlation-Request-Id"
docker-distribution-api-version: "registry/2.0"
location: "https://eusmanaged50.blob.core.windows.net/..."
strict-transport-security: "max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains"
x-content-type-options: "nosniff"
x-ms-correlation-request-id: "..."
I, [2019-11-28T21:51:14.138592 #1]  INFO -- : [efa4f1cd-14a4-49b3-8093-19846ef7f4e6] Completed 500 Internal Server Error in 1562ms (Allocations: 3814)
F, [2019-11-28T21:51:14.140040 #1] FATAL -- : [efa4f1cd-14a4-49b3-8093-19846ef7f4e6]   
[efa4f1cd-14a4-49b3-8093-19846ef7f4e6] JSON::ParserError (767: unexpected token at '<a href="https://eusmanaged50.blob.core.windows.net/...">Temporary Redirect</a>.
'):
[efa4f1cd-14a4-49b3-8093-19846ef7f4e6]   
[efa4f1cd-14a4-49b3-8093-19846ef7f4e6] app/models/tag.rb:22:in `find'
[efa4f1cd-14a4-49b3-8093-19846ef7f4e6] app/controllers/tags_controller.rb:21:in `find_tag'

It appears the redirect isn't followed and the response is instead parsed as JSON which fails.

Deleting single tag is delteing all of them

For example when I have few tags for one image and I want to delete one of them, I type the tag and then press "delete tag" button. The feature is deleting all tags for choosen image, not the one i choose.

Show last update time/date for images and tags

It would be very useful to show on overview page date when some image is update. The same would be nice to have (for me even more interesting) for tags on repository overview page.

I know that this will probably require getting manifests as neither /v2/<name>/tags/list nor /v2/_catalog does provide this information. Kind of caching would be probably also required for large repositories.

BTW: Great project - Thank You!

Token auth is not working

Hi,

I'm currently using docker_auth project as auth backend.

I get a 500 internal error when trying to connect:

I, [2019-12-30T16:52:32.750982 #1]  INFO -- response: Status 200
D, [2019-12-30T16:52:32.751096 #1] DEBUG -- response: content-type: "application/json"
date: "Mon, 30 Dec 2019 16:52:32 GMT"
content-length: "761"
connection: "close"
I, [2019-12-30T16:52:32.751494 #1]  INFO -- : [1ef8210b-a19c-4e5b-a091-0689c46feade] Completed 500 Internal Server Error in 112ms (Allocations: 2239)
F, [2019-12-30T16:52:32.751973 #1] FATAL -- : [1ef8210b-a19c-4e5b-a091-0689c46feade]
[1ef8210b-a19c-4e5b-a091-0689c46feade] KeyError (key not found: "token"):
[1ef8210b-a19c-4e5b-a091-0689c46feade]
[1ef8210b-a19c-4e5b-a091-0689c46feade] app/services/obtain_authentication_token.rb:17:in `fetch'
[1ef8210b-a19c-4e5b-a091-0689c46feade] app/services/obtain_authentication_token.rb:17:in `perform_request'
[1ef8210b-a19c-4e5b-a091-0689c46feade] app/services/obtain_authentication_token.rb:9:in `call'
[1ef8210b-a19c-4e5b-a091-0689c46feade] app/controllers/application_controller.rb:35:in `perform_token_authentication'
[1ef8210b-a19c-4e5b-a091-0689c46feade] app/controllers/application_controller.rb:22:in `client_error'

any clues? Thanks!

Provide credentials

Hi,
How can i provide credentials to authenticate on the registry ?

Thanks !

Using a docker secret file in an environment variable

Hi @klausmeyer ,

In the readme it says that You can also set BASIC_AUTH_USER and BASIC_AUTH_PASSWORD as Docker Swarm secrets. Apparently, when i specify a password file created with docker secret in a stack file like below, the app cannot connect to the registry. the password string is not read from the mentioned file (/run/secrets/registry-pwd). Do you know any other approach for that?

...
  registryui:
    image: klausmeyer/docker-registry-browser
    ...
    secrets:
      - source: registry-v2-pwd 
        target: registry-pwd 
        mode: 0440
    networks:
      - registry-proxy
      - registry-ui
    environment:
      - DOCKER_REGISTRY_URL=https://example.com
      - BASIC_AUTH_USER=hakan
      - BASIC_AUTH_PASSWORD=/run/secrets/registry-pwd

Bug: "The page isn’t redirecting properly" when full access permissions are not provided

Thank you for a useful gui, we've been using it for some time with our internal registry.

Now I configured new registry with token auth, and faced the following problems:

  • if permissions are not configured for/in registry browser, it just redirects to itself without any meaningful error (at least at main page that should show list of images in repo). Finally it brings to browser error "The page isn’t redirecting properly"
  • Even if I configure read only access (actually pull access), and do not enable delete in registry browser, still I get the first problem (like no permissions at all)

Both problems still exist in the latest image klausmeyer/docker-registry-browser:latest although I found a number of complains about "wrong redirect" in the app.
Please fix redirect error to at least show meaningful error mesage
Please consider fixing it to work with r/o permissions, the browser should be able to show info without push permission. Maybe there is some other ACL level besides "pull" and "push"?

Hide images with no remaining tags after deletion

Hi,
there is no delete button in the current app version.
Did I missing some setup or something else?

Config:
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
delete:
enabled: true

Run commands:

docker run -tdi -p 5000:5000
-v /root/registry/config.yml:/etc/docker/registry/config.yml
-v /root/registry/_data:/var/lib/registry
-v /root/registry/certs:/certs
-e REGISTRY_STORAGE_DELETE_ENABLED=true
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key
--network=bridge
--restart=unless-stopped
--name=registry-srv
--hostname=registry-srv
-l hidden="true"
registry:2

docker run -tdi -p 80:8080
-e DOCKER_REGISTRY_URL=https://xyz.somewhere.com
--restart=unless-stopped
--name=registry-browser
--hostname=registry-browser
-l hidden="true"
klausmeyer/docker-registry-browser

The latest image don't run (ruby errors?)

I have recreated a container with de latest image (updated 4 hours ago on docker hub):
image
And don't run never ok, have a ruby errors:
image

But with the image of version 1.2.3 (updated 2 months ago on docker hub), works perfectly.

Self-host icons

Please consider hosting the images in the container itself instead on icons8.com
Serving images from an external domain poses a security and operational risk (if the external domain gets sold/hacked).

RAILS_RELATIVE_URL_ROOT=/browser doesn't work consistently

Hi there:

I'm running with:
RAILS_RELATIVE_URL_ROOT=/browser ENABLE_DELETE_IMAGES=true DOCKER_REGISTRY_URL=https://example.com PORT=8080 bundle exec bundle exec puma -C config/puma.rb

And then I'm running nginx as a reverse proxy with SSL which redirects /browser to docker-registry-browser.

So if I open https://example.com/browser it looks OK, but if I for example click on alpine I get sent to https://example.com/repo/alpine which misses the /browser part. If I go to https://example.com/browser/repo/alpine I do get to see the right page.

Can you reproduce this error?

Unable to browse repository; err.code="name unknown"

I have deployed docker registry and docker-registry-browser with the following docker-compose file:

---
version: '2'

services:
    docker-registry:
        image: registry:2
        container_name: docker-registry
        ports:
            - 5000:5000
        restart: always
        volumes:
            - /var/lib/docker-registry:/var/lib/registry
    
    docker-registry-frontend:
        image: klausmeyer/docker-registry-browser
        container_name: docker-registry-frontend
        ports:
            - 8080:8080
        environment:
            DOCKER_REGISTRY_URL: "http://mydockerhost.local:5000"
            NO_SSL_VERIFICATION: 0

I see the welcome page but when I click the Browse Repositories button I don't see any content, even though I have pushed images to the repository.

There seems to be this error thrown from docker-registry;

level=error msg="response completed with error" err.code="name unknown" err.detail=map[name:registry-host.json] err.message="repository name not known to registry" go.version=go1.11.2 http.request.host="mydockerhost.local:5000"

Full console output below:
console_output.txt

Group tags

In our repo we have multiple tags for a single commit. Example when we do a release:

  • latest
  • development
  • stable

Now you can't see in the repo that these are all the same image. When using AWS ECR they are grouped by the hash they refer to. This makes the overview simpler to see that the tags are indeed the same image.

Support multiple parts image names

We have images with the following format:
{department}/{project}/{component}.

For example:
business/campaigns/memcached
business/financial/memcached
business/

With the current implementation, all the images are displayed:
business
-> memcached
-> memcached

Expected result:
business/campaigns
-> memcached
business/financial
-> memcached

Delete throws 404

Huhu,

if I try to deleta a Tag a 404 is shown and the log shows:

registry-browser_1  | I, [2017-11-14T07:43:36.237549 #6]  INFO -- : [60085b92-41b8-4f6c-a10e-9189bebd4fd4] Started DELETE "/repo/xx/yy-zz/tag/latest" for xxx.xxx.xxx.xxx at 2017-11-14 07:43:36 +0000
registry-browser_1  | F, [2017-11-14T07:43:36.238675 #6] FATAL -- : [60085b92-41b8-4f6c-a10e-9189bebd4fd4]
registry-browser_1  | F, [2017-11-14T07:43:36.238786 #6] FATAL -- : [60085b92-41b8-4f6c-a10e-9189bebd4fd4] ActionController::RoutingError (No route matches [DELETE] "/repo/xx/yy-zz/tag/latest"):
registry-browser_1  | F, [2017-11-14T07:43:36.238860 #6] FATAL -- : [60085b92-41b8-4f6c-a10e-9189bebd4fd4]
registry-browser_1  | F, [2017-11-14T07:43:36.238982 #6] FATAL -- : [60085b92-41b8-4f6c-a10e-9189bebd4fd4] actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'

Do you have any idea what I am doing wrong?

Best regards

Docker Pull Command

Hello @klausmeyer,

First of all thank you for the effort you're putting into this.

It would be great if you could add a small Docker Pull Command box with the docker pull command to pull the current image.

For example, if you go to https://quay.io/repository/prometheus/prometheus on the right side of the page is a Pull this container with the following Docker command: box with the docker pull command to pull the latest prometheus version.

Thanks

Token Authentication not working

I've tried to run a authenticated registry using https://github.com/cesanta/docker_auth. The login via CLI is working fine. I've configured the user by adding TOKEN_AUTH_USER and TOKEN_AUTH_PASSWORD. The request to the docker_auth server https://ip-address/auth?client_id=docker-registry-browser&offline_token=true&scope=registry%3Acatalog%3A%2A&service=Docker-registry is not possible because the request seems to be invalid for the docker_auth server (it throws an exception in the docker_auth log)

Add search feature

Hi!

It would be very interesting to add a search system, that go through names, labels and tags of all images.

What do you think about that?

Thank you for this wonderful piece of code.

support something?

  1. show search
  2. show info of each layer or only show environment variables in the image
  3. simple user and password login
  4. custom mush list show this for images more
  5. show info of LABEL

Allow deletion of null tags

I don't know how, but I have a null tag in my image. And using your image I can't confirm the deletion because the button don't enable when I write null.
Pretty obvious but need to convert the null written to text.
Captura de Tela 2019-07-02 às 09 31 11
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.