Open hwellmann opened 8 years ago
Thanks for the report. Will try to reproduce it (if I find an registry requiring authentication ;-).
Just run your private registry , e.g. via docker-compose
:
version: '2'
services:
registry:
restart: always
image: registry:2
ports:
- 5000:5000
volumes:
- /opt/docker-registry:/var/lib/registry
- ./config.yml:/etc/docker/registry/config.yml
- ./registrypasswd:/etc/docker/registry/registrypasswd
config.yml:
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
delete:
enabled: false
filesystem:
rootdirectory: /var/lib/registry
maintenance:
readonly:
enabled: false
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
auth:
htpasswd:
realm: TEST
path: /etc/docker/registry/registrypasswd
./registrypasswd
is a password file generated by htpasswd
.
Description
I'm starting a container via d-m-p based on an image from a registry which requires authentication. The image is not yet available in my local storage. I forgot to login or add my credentials otherwise.
Expected behaviour
Error message: Unauthorized, please use your credentials.
Actual behaviour
Error message: Image not found. (Even though the image does exist.)
This will confuse the casual user.
By the way,
docker pull
also responds with "image not found" in this situation, but this is no excuse. Directly invoking the registry REST API via curl, I do get a 401 status, not a 404 status.Info
mvn -v
) : 3.3.9