docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

docker search return unexpected 404 error #951

Closed tdoan1971 closed 9 years ago

tdoan1971 commented 9 years ago

I run the docker private registry on local mode with endpoint set sqlalchemy. The pull/push works well: ex: docker pull mylocalregistry:5000/base/rhel6.5:v1

However when I run "docker search mylocalregistry:5000/base". It returns "... unexpected 404" What is the issue?

dmp42 commented 9 years ago

Can you copy:

tdoan1971 commented 9 years ago

Hi dmp42,

Thanks,

dmp42 commented 9 years ago

Can you curl -iv https://mylocalregistry:5000/v1/search?q=base?

tdoan1971 commented 9 years ago

Hi Olivier, I am not near the system now to try the curl command. However I have the flag "--insecure-registry mylocalregistry:5000" on the remote Docker daemon so that it pulls/pushes successfully without user authentication.

dmp42 commented 9 years ago

My point is: I don't think the search is enabled on your registry - that curl command would make sure about that.

tdoan1971 commented 9 years ago

Hi Olivier,

So, how to enable the search for the registry if the curl command is false?

Thanks,

Truong Doan

DISA-EE322 - Perf Analysis & M&S Room: A5D58G 301-225-7335

"Everything happens for a reason!"

-----Original Message----- From: Olivier Gambier [mailto:notifications@github.com] Sent: Monday, March 02, 2015 2:05 PM To: docker/docker-registry Cc: Doan, Truong V CIV DISA EE (US) Subject: Re: [docker-registry] docker search return unexpected 404 error (#951)

My point is: I don't think the search is enabled on your registry - that curl command would make sure about that.

— Reply to this email directly or view it on GitHub https://github.com/docker/docker-registry/issues/951#issuecomment-76783328 . https://github.com/notifications/beacon/AHL-oExsbJDA-XuQp5B9GRijzdBsSAurks5nxKvggaJpZM4DoHYT.gif

dmp42 commented 9 years ago

If the search endpoint is not enabled, make sure what configuration you are actually using and/or that the search backend settings is actually set.

tdoan1971 commented 9 years ago

The problem solved. It turns out that the docker-registry conf file at /etc/sysconfig point to the local flavor which does not have the endpoint flag set. Chage it to the dev flavor to solve the problem.