feat: add Docker Registry V2 endpoint at /v2/
Docker clients expect /v2/ for registry protocol. Maps:
- GET/HEAD /v2/ → 200 with Docker-Distribution-Api-Version header
- GET/HEAD /v2/{remoteName}/* → proxied to the named docker remote
This allows: docker pull artifactapi.example.com/{remoteName}/image:tag
This commit is contained in:
@@ -96,6 +96,7 @@ func (s *Server) routes() chi.Router {
|
||||
|
||||
proxyHandler := v1.NewProxyHandler(s.engine, s.virtEngine, s.db, s.store, s.localHandler)
|
||||
r.Mount("/api/v1", proxyHandler.Routes())
|
||||
r.Mount("/v2", proxyHandler.DockerV2Routes())
|
||||
|
||||
remotesHandler := v2.NewRemotesHandler(s.db)
|
||||
virtualsHandler := v2.NewVirtualsHandler(s.db)
|
||||
|
||||
Reference in New Issue
Block a user