-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot delete image and view history #204
Comments
Using joxit/docker-registry-ui:arm32v7 (2 weeks newer than latest) makes no difference. |
Hello, thank you for using my project 😄 I suspect this is due to you environments. Can you replace you registry environments by a configuration file ?
version: 0.1
storage:
delete:
enabled: true
http:
addr: 0.0.0.0:5000
tls:
certificate: /certs/testserver.local.crt
key: /certs/testserver.local.key
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://testserver.local:5001']
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: Registry Realm
path: /auth/htpasswd |
I'm afraid that doesn't solve it. I (still) get an endlessly rotating circle when requesting the history and "An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE']." when trying to delete an image.
Any ideas? |
I am having the same problem. Deletes appear to be properly configured but result in an error and the history link just spins forever. I also don't see much in the way of logs from the UI, is there a way to get some better logging? |
I remember where this issue came from! This is a docker registry miss-configuration of OPTIONS requests, the registry server MUST return 200 status codes on OPTIONS, but did not. Solution 1: Use the UI as proxy, you should not have CORS errors... (use |
Thanks, that works if I also delete REGISTRY_URL so my docker-compose.yml becomes:
|
Thank you @blomsoft - That was enough of a hint for me to get it working as well. This was my working
services:
registry:
container_name: class_registry
image: registry:2.7
restart: unless-stopped
networks:
- my-net
ports:
- "5000:5000"
environment:
REGISTRY_HTTP_TLS_CERTIFICATE: "/certs/domain.crt"
REGISTRY_HTTP_TLS_KEY: "/certs/domain.key"
REGISTRY_HTTP_SECRET: "kdhsf7834hfhhkf"
volumes:
- "./files/config.yml:/etc/docker/registry/config.yml"
- "./files/htpasswd:/htpasswd"
- "./data:/var/lib/registry"
- "./certs:/certs"
ui:
container_name: class_registry_ui
image: joxit/docker-registry-ui:latest
restart: unless-stopped
networks:
- my-net
ports:
- "8080:80"
environment:
DELETE_IMAGES: "true"
NGINX_PROXY_PASS_URL: "https://registry:5000"
REGISTRY_TITLE: "My Private Registry"
SINGLE_REGISTRY: "true"
depends_on:
- registry
networks:
my-net:
driver: bridge
version: 0.1
log:
accesslog:
disabled: false
level: debug
fields:
service: registry
environment: development
storage:
delete:
enabled: true
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: 0.0.0.0:5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://127.0.0.1:8080']
Access-Control-Allow-Credentials: [true]
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Expose-Headers: ['Docker-Content-Digest']
auth:
htpasswd:
realm: Registry Realm
path: /htpasswd
notifications:
endpoints:
- name: local-8083
url: http://localhost:8083/callback
timeout: 1s
threshold: 10
backoff: 1s
disabled: true
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3 |
Hi, I have the same problem as in #75: it works well, except for showing the history and for deleting images. This is my docker-compose.yml, my server is called testserver.local in my private network at home (it's a Raspberry Pi) and the error that I see in the log of docker-registry-ui, when requesting the history or a delete, is msg="error authorizing context: basic authentication challenge for realm "Registry Realm": invalid authorization credential". The certificates of docker-registry are self-signed and I don't use HTTPS for docker-registry-ui yet. The browser that I use for docker-registry-ui asks for credentials and these seem to work.
When I turn off authentication on docker-registry, delete and history work fine.
Can you help?
Difference without authentication is in these lines (perhaps less changes will do too):
The text was updated successfully, but these errors were encountered: