Skip to content

Commit

Permalink
feat(storage/driver): oss support; update go module name
Browse files Browse the repository at this point in the history
  • Loading branch information
reedchan7 committed Jan 29, 2023
1 parent a171332 commit f5fa84e
Show file tree
Hide file tree
Showing 305 changed files with 32,039 additions and 2,021 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ language: go
go:
- "1.13.x"

go_import_path: github.com/juan-chan/distribution
go_import_path: github.com/reedchan7/distribution

addons:
apt:
Expand Down
34 changes: 17 additions & 17 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ environment.
If a Go development environment is setup, one can use `go get` to install the
`registry` command from the current latest:

go get github.com/juan-chan/distribution/cmd/registry
go get github.com/reedchan7/distribution/cmd/registry

The above will install the source repository into the `GOPATH`.

Expand All @@ -43,17 +43,17 @@ The `registry`
binary can then be run with the following:

$ $GOPATH/bin/registry --version
$GOPATH/bin/registry github.com/juan-chan/distribution v2.0.0-alpha.1+unknown
$GOPATH/bin/registry github.com/reedchan7/distribution v2.0.0-alpha.1+unknown

> __NOTE:__ While you do not need to use `go get` to checkout the distribution
> project, for these build instructions to work, the project must be checked
> out in the correct location in the `GOPATH`. This should almost always be
> `$GOPATH/src/github.com/juan-chan/distribution`.
> `$GOPATH/src/github.com/reedchan7/distribution`.
The registry can be run with the default config using the following
incantation:

$ $GOPATH/bin/registry serve $GOPATH/src/github.com/juan-chan/distribution/cmd/registry/config-example.yml
$ $GOPATH/bin/registry serve $GOPATH/src/github.com/reedchan7/distribution/cmd/registry/config-example.yml
INFO[0000] endpoint local-5003 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
INFO[0000] endpoint local-8083 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
INFO[0000] listening on :5000 app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown
Expand All @@ -64,7 +64,7 @@ If it is working, one should see the above log messages.
### Repeatable Builds

For the full development experience, one should `cd` into
`$GOPATH/src/github.com/juan-chan/distribution`. From there, the regular `go`
`$GOPATH/src/github.com/reedchan7/distribution`. From there, the regular `go`
commands, such as `go test`, should work per package (please see
[Developing](#developing) if they don't work).

Expand All @@ -87,20 +87,20 @@ build:
github.com/docker/libtrust
...
github.com/yvasiyarov/gorelic
github.com/juan-chan/distribution/registry/handlers
github.com/juan-chan/distribution/cmd/registry
github.com/reedchan7/distribution/registry/handlers
github.com/reedchan7/distribution/cmd/registry
+ test
...
ok github.com/juan-chan/distribution/digest 7.875s
ok github.com/juan-chan/distribution/manifest 0.028s
ok github.com/juan-chan/distribution/notifications 17.322s
? github.com/juan-chan/distribution/registry [no test files]
ok github.com/juan-chan/distribution/registry/api/v2 0.101s
? github.com/juan-chan/distribution/registry/auth [no test files]
ok github.com/juan-chan/distribution/registry/auth/silly 0.011s
ok github.com/reedchan7/distribution/digest 7.875s
ok github.com/reedchan7/distribution/manifest 0.028s
ok github.com/reedchan7/distribution/notifications 17.322s
? github.com/reedchan7/distribution/registry [no test files]
ok github.com/reedchan7/distribution/registry/api/v2 0.101s
? github.com/reedchan7/distribution/registry/auth [no test files]
ok github.com/reedchan7/distribution/registry/auth/silly 0.011s
...
+ /Users/sday/go/src/github.com/juan-chan/distribution/bin/registry
+ /Users/sday/go/src/github.com/juan-chan/distribution/bin/registry-api-descriptor-template
+ /Users/sday/go/src/github.com/reedchan7/distribution/bin/registry
+ /Users/sday/go/src/github.com/reedchan7/distribution/bin/registry-api-descriptor-template
+ binaries

The above provides a repeatable build using the contents of the vendor
Expand All @@ -109,7 +109,7 @@ testing and generating tagged binaries. We can verify this worked by running
the registry binary generated in the "./bin" directory:

$ ./bin/registry --version
./bin/registry github.com/juan-chan/distribution v2.0.0-alpha.2-80-g16d8b2c.m
./bin/registry github.com/reedchan7/distribution v2.0.0-alpha.2-80-g16d8b2c.m

### Optional build tags

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG GO_VERSION=1.13.8

FROM coding-public-docker.pkg.coding.net/public/docker/golang:${GO_VERSION}-alpine3.11 AS build

ENV DISTRIBUTION_DIR /go/src/github.com/juan-chan/distribution
ENV DISTRIBUTION_DIR /go/src/github.com/reedchan7/distribution
ENV BUILDTAGS include_oss include_cos include_gcs
ENV GO_BUILD_FLAGS -mod=vendor

Expand Down Expand Up @@ -30,7 +30,7 @@ RUN set -ex \

COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
COPY start-server.sh /etc/docker/registry/start-server.sh
COPY --from=build /go/src/github.com/juan-chan/distribution/bin/registry /bin/registry
COPY --from=build /go/src/github.com/reedchan7/distribution/bin/registry /bin/registry
COPY --from=build /usr/local/go/lib/time/zoneinfo.zip /opt

RUN mkdir /usr/share/zoneinfo \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)


PKG=github.com/juan-chan/distribution
PKG=github.com/reedchan7/distribution

# Project packages.
PACKAGES=$(shell go list -tags "${BUILDTAGS}" ./... | grep -v /vendor/)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ for building a registry solution or running a simple private registry.
<img src="https://www.docker.com/sites/default/files/oyster-registry-3.png" width=200px/>

[![Build Status](https://travis-ci.org/docker/distribution.svg?branch=master)](https://travis-ci.org/docker/distribution)
[![GoDoc](https://godoc.org/github.com/juan-chan/distribution?status.svg)](https://godoc.org/github.com/juan-chan/distribution)
[![GoDoc](https://godoc.org/github.com/reedchan7/distribution?status.svg)](https://godoc.org/github.com/reedchan7/distribution)

This repository contains the following components:

|**Component** |Description |
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **registry** | An implementation of the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec). |
| **libraries** | A rich set of libraries for interacting with distribution components. Please see [godoc](https://godoc.org/github.com/juan-chan/distribution) for details. **Note**: The interfaces for these libraries are **unstable**. |
| **libraries** | A rich set of libraries for interacting with distribution components. Please see [godoc](https://godoc.org/github.com/reedchan7/distribution) for details. **Note**: The interfaces for these libraries are **unstable**. |
| **documentation** | Docker's full documentation set is available at [docs.docker.com](https://docs.docker.com). This repository [contains the subset](docs/) related just to the registry. |

### How does this integrate with Docker, containerd, and other OCI client?
Expand Down
14 changes: 7 additions & 7 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ considerations made in respect of the future of the project.

## Distribution Components

Components of the Distribution Project are managed via github [milestones](https://github.com/juan-chan/distribution/milestones). Upcoming
Components of the Distribution Project are managed via github [milestones](https://github.com/reedchan7/distribution/milestones). Upcoming
features and bugfixes for a component will be added to the relevant milestone. If a feature or
bugfix is not part of a milestone, it is currently unscheduled for
implementation.
Expand All @@ -39,7 +39,7 @@ implementation.
The new Docker registry is the main portion of the distribution repository.
Registry 2.0 is the first release of the next-generation registry. This was
primarily focused on implementing the [new registry
API](https://github.com/juan-chan/distribution/blob/master/docs/spec/api.md),
API](https://github.com/reedchan7/distribution/blob/master/docs/spec/api.md),
with a focus on security and performance.

Following from the Distribution project goals above, we have a set of goals
Expand Down Expand Up @@ -145,7 +145,7 @@ process. Once this has been explored, we integrate with the docker client.

Please see the following for more detail:

- https://github.com/juan-chan/distribution/issues/206
- https://github.com/reedchan7/distribution/issues/206

##### Deletes

Expand Down Expand Up @@ -243,9 +243,9 @@ very cheap disk space for a complex deployment and operational story.

Please see the following issues for more detail:

- https://github.com/juan-chan/distribution/issues/422
- https://github.com/juan-chan/distribution/issues/461
- https://github.com/juan-chan/distribution/issues/462
- https://github.com/reedchan7/distribution/issues/422
- https://github.com/reedchan7/distribution/issues/461
- https://github.com/reedchan7/distribution/issues/462

### Distribution Package

Expand All @@ -263,5 +263,5 @@ just the registry.

### Project Planning

An [Open-Source Planning Process](https://github.com/juan-chan/distribution/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/juan-chan/distribution/wiki) define the goals for each Milestone and identify current progress.
An [Open-Source Planning Process](https://github.com/reedchan7/distribution/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/reedchan7/distribution/wiki) define the goals for each Milestone and identify current progress.

2 changes: 1 addition & 1 deletion blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"net/http"
"time"

"github.com/juan-chan/distribution/reference"
"github.com/opencontainers/go-digest"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/reedchan7/distribution/reference"
)

var (
Expand Down
7 changes: 3 additions & 4 deletions cmd/digest/main.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package main

import (
_ "crypto/sha256"
_ "crypto/sha512"
"flag"
"fmt"
"io"
"log"
"os"

"github.com/juan-chan/distribution/version"
"github.com/opencontainers/go-digest"

_ "crypto/sha256"
_ "crypto/sha512"
"github.com/reedchan7/distribution/version"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions cmd/registry-api-descriptor-template/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// For example, to generate a new API specification, one would execute the
// following command from the repo root:
//
// $ registry-api-descriptor-template docs/spec/api.md.tmpl > docs/spec/api.md
// $ registry-api-descriptor-template docs/spec/api.md.tmpl > docs/spec/api.md
//
// The templates are passed in the api/v2.APIDescriptor object. Please see the
// package documentation for fields available on that object. The template
Expand All @@ -20,8 +20,8 @@ import (
"regexp"
"text/template"

"github.com/juan-chan/distribution/registry/api/errcode"
v2 "github.com/juan-chan/distribution/registry/api/v2"
"github.com/reedchan7/distribution/registry/api/errcode"
v2 "github.com/reedchan7/distribution/registry/api/v2"
)

var spaceRegex = regexp.MustCompile(`\n\s*`)
Expand Down
30 changes: 15 additions & 15 deletions cmd/registry/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ package main
import (
_ "net/http/pprof"

"github.com/juan-chan/distribution/registry"
_ "github.com/juan-chan/distribution/registry/auth/htpasswd"
_ "github.com/juan-chan/distribution/registry/auth/silly"
_ "github.com/juan-chan/distribution/registry/auth/token"
_ "github.com/juan-chan/distribution/registry/proxy"
_ "github.com/juan-chan/distribution/registry/storage/driver/azure"
_ "github.com/juan-chan/distribution/registry/storage/driver/filesystem"
_ "github.com/juan-chan/distribution/registry/storage/driver/gcs"
_ "github.com/juan-chan/distribution/registry/storage/driver/inmemory"
_ "github.com/juan-chan/distribution/registry/storage/driver/middleware/alicdn"
_ "github.com/juan-chan/distribution/registry/storage/driver/middleware/cloudfront"
_ "github.com/juan-chan/distribution/registry/storage/driver/middleware/redirect"
_ "github.com/juan-chan/distribution/registry/storage/driver/oss"
_ "github.com/juan-chan/distribution/registry/storage/driver/s3-aws"
_ "github.com/juan-chan/distribution/registry/storage/driver/swift"
"github.com/reedchan7/distribution/registry"
_ "github.com/reedchan7/distribution/registry/auth/htpasswd"
_ "github.com/reedchan7/distribution/registry/auth/silly"
_ "github.com/reedchan7/distribution/registry/auth/token"
_ "github.com/reedchan7/distribution/registry/proxy"
_ "github.com/reedchan7/distribution/registry/storage/driver/azure"
_ "github.com/reedchan7/distribution/registry/storage/driver/filesystem"
_ "github.com/reedchan7/distribution/registry/storage/driver/gcs"
_ "github.com/reedchan7/distribution/registry/storage/driver/inmemory"
_ "github.com/reedchan7/distribution/registry/storage/driver/middleware/alicdn"
_ "github.com/reedchan7/distribution/registry/storage/driver/middleware/cloudfront"
_ "github.com/reedchan7/distribution/registry/storage/driver/middleware/redirect"
_ "github.com/reedchan7/distribution/registry/storage/driver/oss"
_ "github.com/reedchan7/distribution/registry/storage/driver/s3-aws"
_ "github.com/reedchan7/distribution/registry/storage/driver/swift"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"sync"

"github.com/juan-chan/distribution/uuid"
"github.com/reedchan7/distribution/uuid"
)

// instanceContext is a context that provides only an instance id. It is
Expand All @@ -21,7 +21,7 @@ func (ic *instanceContext) Value(key interface{}) interface{} {
// We want to lazy initialize the UUID such that we don't
// call a random generator from the package initialization
// code. For various reasons random could not be available
// https://github.com/juan-chan/distribution/issues/782
// https://github.com/reedchan7/distribution/issues/782
ic.id = uuid.Generate().String()
})
return ic.id
Expand Down
2 changes: 1 addition & 1 deletion context/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

"github.com/juan-chan/distribution/uuid"
"github.com/gorilla/mux"
"github.com/reedchan7/distribution/uuid"
log "github.com/sirupsen/logrus"
)

Expand Down
14 changes: 7 additions & 7 deletions context/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"time"

"github.com/juan-chan/distribution/uuid"
"github.com/reedchan7/distribution/uuid"
)

// WithTrace allocates a traced timing span in a new context. This allows a
Expand All @@ -24,16 +24,16 @@ import (
//
// Here is an example of the usage:
//
// func timedOperation(ctx Context) {
// ctx, done := WithTrace(ctx)
// defer done("this will be the log message")
// // ... function body ...
// }
// func timedOperation(ctx Context) {
// ctx, done := WithTrace(ctx)
// defer done("this will be the log message")
// // ... function body ...
// }
//
// If the function ran for roughly 1s, such a usage would emit a log message
// as follows:
//
// INFO[0001] this will be the log message trace.duration=1.004575763s trace.func=github.com/juan-chan/distribution/context.traceOperation trace.id=<id> ...
// INFO[0001] this will be the log message trace.duration=1.004575763s trace.func=github.com/reedchan7/distribution/context.traceOperation trace.id=<id> ...
//
// Notice that the function name is automatically resolved, along with the
// package and a trace id is emitted that can be linked with parent ids.
Expand Down
2 changes: 1 addition & 1 deletion contrib/docker-integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ RUN apk add --no-cache git

ENV TMPDIR /var/lib/docker/tmp

WORKDIR /go/src/github.com/juan-chan/distribution/contrib/docker-integration
WORKDIR /go/src/github.com/reedchan7/distribution/contrib/docker-integration
2 changes: 1 addition & 1 deletion contrib/docker-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ the [release page](https://github.com/docker/golem/releases/tag/v0.1).
Additionally golem can be run as a docker image requiring no additional
installation.

`docker run --privileged -v "$GOPATH/src/github.com/juan-chan/distribution/contrib/docker-integration:/test" -w /test distribution/golem golem -rundaemon .`
`docker run --privileged -v "$GOPATH/src/github.com/reedchan7/distribution/contrib/docker-integration:/test" -w /test distribution/golem golem -rundaemon .`

#### Golem custom images

Expand Down
2 changes: 1 addition & 1 deletion contrib/token-server/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"net/http"

"github.com/juan-chan/distribution/registry/api/errcode"
"github.com/reedchan7/distribution/registry/api/errcode"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions contrib/token-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"strings"
"time"

dcontext "github.com/juan-chan/distribution/context"
"github.com/juan-chan/distribution/registry/api/errcode"
"github.com/juan-chan/distribution/registry/auth"
_ "github.com/juan-chan/distribution/registry/auth/htpasswd"
"github.com/docker/libtrust"
"github.com/gorilla/mux"
dcontext "github.com/reedchan7/distribution/context"
"github.com/reedchan7/distribution/registry/api/errcode"
"github.com/reedchan7/distribution/registry/auth"
_ "github.com/reedchan7/distribution/registry/auth/htpasswd"
"github.com/sirupsen/logrus"
)

Expand Down
6 changes: 3 additions & 3 deletions contrib/token-server/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"strings"
"time"

dcontext "github.com/juan-chan/distribution/context"
"github.com/juan-chan/distribution/registry/auth"
"github.com/juan-chan/distribution/registry/auth/token"
"github.com/docker/libtrust"
dcontext "github.com/reedchan7/distribution/context"
"github.com/reedchan7/distribution/registry/auth"
"github.com/reedchan7/distribution/registry/auth/token"
)

// ResolveScopeSpecifiers converts a list of scope specifiers from a token
Expand Down
Loading

0 comments on commit f5fa84e

Please sign in to comment.