Move from docker-registry to distribution

This commit is contained in:
Olivier Gambier 2014-12-23 16:01:38 -08:00
parent 83b810104c
commit 67ca9d10cf
58 changed files with 114 additions and 114 deletions

View file

@ -1,10 +1,10 @@
FROM golang FROM golang
COPY . /go/src/github.com/docker/docker-registry COPY . /go/src/github.com/docker/distribution
# Fetch any dependencies to run the registry # Fetch any dependencies to run the registry
RUN go get github.com/docker/docker-registry/... RUN go get github.com/docker/distribution/...
RUN go install github.com/docker/docker-registry/cmd/registry RUN go install github.com/docker/distribution/cmd/registry
ENV CONFIG_PATH /etc/docker/registry/config.yml ENV CONFIG_PATH /etc/docker/registry/config.yml
COPY ./cmd/registry/config.yml $CONFIG_PATH COPY ./cmd/registry/config.yml $CONFIG_PATH

View file

@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"regexp" "regexp"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
var ( var (

View file

@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
// TestErrorCodes ensures that error code format, mappings and // TestErrorCodes ensures that error code format, mappings and

View file

@ -4,7 +4,7 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )

View file

@ -13,12 +13,12 @@ import (
"os" "os"
"testing" "testing"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/common/testutil" "github.com/docker/distribution/common/testutil"
"github.com/docker/docker-registry/configuration" "github.com/docker/distribution/configuration"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
_ "github.com/docker/docker-registry/storagedriver/inmemory" _ "github.com/docker/distribution/storagedriver/inmemory"
"github.com/docker/libtrust" "github.com/docker/libtrust"
"github.com/gorilla/handlers" "github.com/gorilla/handlers"
) )

12
app.go
View file

@ -4,12 +4,12 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/auth" "github.com/docker/distribution/auth"
"github.com/docker/docker-registry/configuration" "github.com/docker/distribution/configuration"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/factory" "github.com/docker/distribution/storagedriver/factory"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/gorilla/mux" "github.com/gorilla/mux"

View file

@ -7,9 +7,9 @@ import (
"net/url" "net/url"
"testing" "testing"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
_ "github.com/docker/docker-registry/auth/silly" _ "github.com/docker/distribution/auth/silly"
"github.com/docker/docker-registry/configuration" "github.com/docker/distribution/configuration"
) )
// TestAppDispatcher builds an application with a test dispatcher and ensures // TestAppDispatcher builds an application with a test dispatcher and ensures

View file

@ -12,7 +12,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/docker/docker-registry/auth" "github.com/docker/distribution/auth"
) )
// accessController provides a simple implementation of auth.AccessController // accessController provides a simple implementation of auth.AccessController

View file

@ -5,7 +5,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"github.com/docker/docker-registry/auth" "github.com/docker/distribution/auth"
) )
func TestSillyAccessController(t *testing.T) { func TestSillyAccessController(t *testing.T) {

View file

@ -13,8 +13,8 @@ import (
"github.com/docker/libtrust" "github.com/docker/libtrust"
"github.com/docker/docker-registry/auth" "github.com/docker/distribution/auth"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
) )
// accessSet maps a typed, named resource to // accessSet maps a typed, named resource to

View file

@ -13,8 +13,8 @@ import (
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/docker/libtrust" "github.com/docker/libtrust"
"github.com/docker/docker-registry/auth" "github.com/docker/distribution/auth"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
) )
const ( const (

View file

@ -17,8 +17,8 @@ import (
"github.com/docker/libtrust" "github.com/docker/libtrust"
"github.com/docker/docker-registry/auth" "github.com/docker/distribution/auth"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
) )
func makeRootKeys(numKeys int) ([]libtrust.PrivateKey, error) { func makeRootKeys(numKeys int) ([]libtrust.PrivateKey, error) {

View file

@ -5,7 +5,7 @@ import (
"errors" "errors"
"strings" "strings"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
) )
// joseBase64UrlEncode encodes the given data using the standard base64 url // joseBase64UrlEncode encodes the given data using the standard base64 url

View file

@ -10,9 +10,9 @@ import (
"regexp" "regexp"
"strconv" "strconv"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
) )
// Client implements the client interface to the registry http api // Client implements the client interface to the registry http api

View file

@ -9,9 +9,9 @@ import (
"sync" "sync"
"testing" "testing"
"github.com/docker/docker-registry/common/testutil" "github.com/docker/distribution/common/testutil"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
) )
type testBlob struct { type testBlob struct {

View file

@ -3,7 +3,7 @@ package client
import ( import (
"fmt" "fmt"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
// RepositoryNotFoundError is returned when making an operation against a // RepositoryNotFoundError is returned when making an operation against a

View file

@ -6,8 +6,8 @@ import (
"io" "io"
"sync" "sync"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
) )
var ( var (

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
) )

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
) )
// simultaneousLayerPushWindow is the size of the parallel layer push window. // simultaneousLayerPushWindow is the size of the parallel layer push window.

View file

@ -20,7 +20,7 @@ import (
"regexp" "regexp"
"text/template" "text/template"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
) )
var spaceRegex = regexp.MustCompile(`\n\s*`) var spaceRegex = regexp.MustCompile(`\n\s*`)

View file

@ -7,8 +7,8 @@ import (
"os" "os"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/storagedriver/azure" "github.com/docker/distribution/storagedriver/azure"
"github.com/docker/docker-registry/storagedriver/ipc" "github.com/docker/distribution/storagedriver/ipc"
) )
// An out-of-process Azure Storage driver, intended to be run by ipc.NewDriverClient // An out-of-process Azure Storage driver, intended to be run by ipc.NewDriverClient

View file

@ -8,8 +8,8 @@ import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/storagedriver/filesystem" "github.com/docker/distribution/storagedriver/filesystem"
"github.com/docker/docker-registry/storagedriver/ipc" "github.com/docker/distribution/storagedriver/ipc"
) )
// An out-of-process filesystem driver, intended to be run by ipc.NewDriverClient // An out-of-process filesystem driver, intended to be run by ipc.NewDriverClient

View file

@ -4,8 +4,8 @@ package main
import ( import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/storagedriver/inmemory" "github.com/docker/distribution/storagedriver/inmemory"
"github.com/docker/docker-registry/storagedriver/ipc" "github.com/docker/distribution/storagedriver/ipc"
) )
// An out-of-process inmemory driver, intended to be run by ipc.NewDriverClient // An out-of-process inmemory driver, intended to be run by ipc.NewDriverClient

View file

@ -8,8 +8,8 @@ import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/storagedriver/ipc" "github.com/docker/distribution/storagedriver/ipc"
"github.com/docker/docker-registry/storagedriver/s3" "github.com/docker/distribution/storagedriver/s3"
) )
// An out-of-process S3 driver, intended to be run by ipc.NewDriverClient // An out-of-process S3 driver, intended to be run by ipc.NewDriverClient

View file

@ -12,12 +12,12 @@ import (
"github.com/gorilla/handlers" "github.com/gorilla/handlers"
"github.com/yvasiyarov/gorelic" "github.com/yvasiyarov/gorelic"
"github.com/docker/docker-registry" "github.com/docker/distribution"
_ "github.com/docker/docker-registry/auth/silly" _ "github.com/docker/distribution/auth/silly"
_ "github.com/docker/docker-registry/auth/token" _ "github.com/docker/distribution/auth/token"
"github.com/docker/docker-registry/configuration" "github.com/docker/distribution/configuration"
_ "github.com/docker/docker-registry/storagedriver/filesystem" _ "github.com/docker/distribution/storagedriver/filesystem"
_ "github.com/docker/docker-registry/storagedriver/inmemory" _ "github.com/docker/distribution/storagedriver/inmemory"
) )
func main() { func main() {

View file

@ -2,7 +2,7 @@ package registry
import ( import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
) )
// Context should contain the request specific context for use in across // Context should contain the request specific context for use in across

View file

@ -10,7 +10,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
"github.com/docker/docker/pkg/tarsum" "github.com/docker/docker/pkg/tarsum"
) )

View file

@ -7,7 +7,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/docker/docker-registry/common/testutil" "github.com/docker/distribution/common/testutil"
) )
func TestDigestVerifier(t *testing.T) { func TestDigestVerifier(t *testing.T) {

View file

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
"github.com/gorilla/handlers" "github.com/gorilla/handlers"
) )

View file

@ -3,9 +3,9 @@ package registry
import ( import (
"net/http" "net/http"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
"github.com/gorilla/handlers" "github.com/gorilla/handlers"
) )

View file

@ -7,9 +7,9 @@ import (
"strconv" "strconv"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
"github.com/gorilla/handlers" "github.com/gorilla/handlers"
) )

View file

@ -7,7 +7,7 @@ import (
"os" "os"
"time" "time"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
) )
// remoteFileReader provides a read seeker interface to files stored in // remoteFileReader provides a read seeker interface to files stored in

View file

@ -8,9 +8,9 @@ import (
"os" "os"
"testing" "testing"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storagedriver/inmemory" "github.com/docker/distribution/storagedriver/inmemory"
) )
func TestSimpleRead(t *testing.T) { func TestSimpleRead(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"io" "io"
"time" "time"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
// Layer provides a readable and seekable layer object. Typically, // Layer provides a readable and seekable layer object. Typically,

View file

@ -9,10 +9,10 @@ import (
"os" "os"
"testing" "testing"
"github.com/docker/docker-registry/common/testutil" "github.com/docker/distribution/common/testutil"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/inmemory" "github.com/docker/distribution/storagedriver/inmemory"
) )
// TestSimpleLayerUpload covers the layer upload process, exercising common // TestSimpleLayerUpload covers the layer upload process, exercising common

View file

@ -3,7 +3,7 @@ package storage
import ( import (
"time" "time"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
// layerReadSeeker implements Layer and provides facilities for reading and // layerReadSeeker implements Layer and provides facilities for reading and

View file

@ -1,8 +1,8 @@
package storage package storage
import ( import (
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
) )
type layerStore struct { type layerStore struct {

View file

@ -9,8 +9,8 @@ import (
"code.google.com/p/go-uuid/uuid" "code.google.com/p/go-uuid/uuid"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker/pkg/tarsum" "github.com/docker/docker/pkg/tarsum"
"io" "io"

View file

@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/libtrust" "github.com/docker/libtrust"
) )

View file

@ -6,8 +6,8 @@ import (
"github.com/docker/libtrust" "github.com/docker/libtrust"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storagedriver/inmemory" "github.com/docker/distribution/storagedriver/inmemory"
) )
func TestManifestStorage(t *testing.T) { func TestManifestStorage(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"path" "path"
"strings" "strings"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/libtrust" "github.com/docker/libtrust"
) )

View file

@ -5,8 +5,8 @@ import (
"path" "path"
"strings" "strings"
"github.com/docker/docker-registry/common" "github.com/docker/distribution/common"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
const storagePathVersion = "v2" const storagePathVersion = "v2"

View file

@ -3,7 +3,7 @@ package storage
import ( import (
"testing" "testing"
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
) )
func TestPathMapper(t *testing.T) { func TestPathMapper(t *testing.T) {

View file

@ -1,8 +1,8 @@
package storage package storage
import ( import (
"github.com/docker/docker-registry/digest" "github.com/docker/distribution/digest"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
) )
// Services provides various services with application-level operations for // Services provides various services with application-level operations for

View file

@ -13,8 +13,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/factory" "github.com/docker/distribution/storagedriver/factory"
azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage" azure "github.com/MSOpenTech/azure-sdk-for-go/clients/storage"
) )

View file

@ -8,8 +8,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/testsuites" "github.com/docker/distribution/storagedriver/testsuites"
. "gopkg.in/check.v1" . "gopkg.in/check.v1"
) )

View file

@ -3,7 +3,7 @@ package factory
import ( import (
"fmt" "fmt"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
) )
// driverFactories stores an internal mapping between storage driver names and their respective // driverFactories stores an internal mapping between storage driver names and their respective

View file

@ -9,8 +9,8 @@ import (
"path" "path"
"time" "time"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/factory" "github.com/docker/distribution/storagedriver/factory"
) )
const driverName = "filesystem" const driverName = "filesystem"

View file

@ -5,8 +5,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/testsuites" "github.com/docker/distribution/storagedriver/testsuites"
. "gopkg.in/check.v1" . "gopkg.in/check.v1"
) )

View file

@ -8,8 +8,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/factory" "github.com/docker/distribution/storagedriver/factory"
) )
const driverName = "inmemory" const driverName = "inmemory"

View file

@ -3,8 +3,8 @@ package inmemory
import ( import (
"testing" "testing"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/testsuites" "github.com/docker/distribution/storagedriver/testsuites"
"gopkg.in/check.v1" "gopkg.in/check.v1"
) )

View file

@ -13,7 +13,7 @@ import (
"os/exec" "os/exec"
"syscall" "syscall"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/libchan" "github.com/docker/libchan"
"github.com/docker/libchan/spdy" "github.com/docker/libchan/spdy"
) )

View file

@ -7,7 +7,7 @@ import (
"io" "io"
"reflect" "reflect"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/libchan" "github.com/docker/libchan"
) )

View file

@ -10,7 +10,7 @@ import (
"os" "os"
"reflect" "reflect"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/libchan" "github.com/docker/libchan"
"github.com/docker/libchan/spdy" "github.com/docker/libchan/spdy"
) )

View file

@ -26,8 +26,8 @@ import (
"github.com/crowdmob/goamz/aws" "github.com/crowdmob/goamz/aws"
"github.com/crowdmob/goamz/s3" "github.com/crowdmob/goamz/s3"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/factory" "github.com/docker/distribution/storagedriver/factory"
) )
const driverName = "s3" const driverName = "s3"

View file

@ -7,8 +7,8 @@ import (
"testing" "testing"
"github.com/crowdmob/goamz/aws" "github.com/crowdmob/goamz/aws"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"github.com/docker/docker-registry/storagedriver/testsuites" "github.com/docker/distribution/storagedriver/testsuites"
"gopkg.in/check.v1" "gopkg.in/check.v1"
) )

View file

@ -13,7 +13,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/distribution/storagedriver"
"gopkg.in/check.v1" "gopkg.in/check.v1"
) )

View file

@ -4,8 +4,8 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"github.com/docker/docker-registry/api/v2" "github.com/docker/distribution/api/v2"
"github.com/docker/docker-registry/storage" "github.com/docker/distribution/storage"
"github.com/gorilla/handlers" "github.com/gorilla/handlers"
) )