Skip to content

Commit

Permalink
registry: remove
Browse files Browse the repository at this point in the history
Signed-off-by: David Karlsson <david.karlsson@docker.com>
  • Loading branch information
dvdksn committed Nov 4, 2022
1 parent 29e169c commit bf7657c
Show file tree
Hide file tree
Showing 49 changed files with 241 additions and 2,695 deletions.
21 changes: 8 additions & 13 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ compose_version: "v2.12.2"
compose_file_v3: "3.9"
compose_file_v2: "2.4"
machine_version: "0.16.0"
distribution_version: "2.7"
compose_switch_version: "1.0.4"
buildkit_version: "0.10.5"

Expand Down Expand Up @@ -199,18 +198,6 @@ fetch-remote:
src:
- "docs/guides/cache/**"

- repo: "https://github.com/distribution/distribution"
default_branch: "main"
ref: "main"
paths:
- dest: "registry/spec"
src:
- "docs/spec/**"
- "!docs/spec/api.md.tmpl"
- dest: "registry"
src:
- "docs/configuration.md"

- repo: "https://github.com/moby/buildkit"
default_branch: "master"
ref: "master"
Expand All @@ -221,3 +208,11 @@ fetch-remote:
- dest: "build/buildkit/toml-configuration.md"
src:
- "docs/buildkitd.toml.md"

- repo: "https://github.com/distribution/distribution"
default_branch: "master"
ref: "main"
paths:
- dest: "registry/spec/auth"
src:
- "docs/spec/auth/**.md"
98 changes: 19 additions & 79 deletions _data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ guides:
title: Create your own base image (advanced)
- path: /develop/scan-images/
title: Scan images
- path: /develop/local-registry/
title: Run a local registry
- sectiontitle: Deploy your app to the cloud
section:
- path: /cloud/aci-integration/
Expand Down Expand Up @@ -986,16 +988,28 @@ reference:
title: v1.19 reference
- path: /engine/api/v1.18/
title: v1.18 reference
- sectiontitle: Docker Hub API
- sectiontitle: Docker Hub APIs
section:
- title: Overview
path: /docker-hub/api/
- title: Docker Hub API
path: /docker-hub/api/latest/
- title: DVP Data API
path: /docker-hub/api/dvp/
- title: Deprecated API
path: /docker-hub/api/deprecated/
- title: Registry API
path: /registry/spec/api/
- sectiontitle: Authentication
section:
- path: /registry/spec/auth/
title: Docker Registry token authentication
- path: /registry/spec/auth/jwt/
title: Token authentication implementation
- path: /registry/spec/auth/oauth/
title: Oauth2 token authentication
- path: /registry/spec/auth/scope/
title: Token scope documentation
- path: /registry/spec/auth/token/
title: Token authentication specification
- sectiontitle: Docker Extension SDK API (Beta)
section:
- path: /desktop/extensions-sdk/dev/api/reference/interfaces/DesktopUI/
Expand Down Expand Up @@ -1064,46 +1078,6 @@ reference:
title: Version 3
- path: /compose/compose-file/compose-file-v2/
title: Version 2
- sectiontitle: Drivers and specifications
section:
- sectiontitle: Registry image manifests
section:
- path: /registry/spec/manifest-v2-1/
title: Image manifest v 2, schema 1
- path: /registry/spec/manifest-v2-2/
title: Image manifest v 2, schema 2
- path: /registry/spec/deprecated-schema-v1/
title: Update deprecated schema v1 images
- sectiontitle: Registry token authorization
section:
- path: /registry/spec/auth/
title: Docker Registry token authentication
- path: /registry/spec/auth/jwt/
title: Token authentication implementation
- path: /registry/spec/auth/oauth/
title: Oauth2 token authentication
- path: /registry/spec/auth/scope/
title: Token scope documentation
- path: /registry/spec/auth/token/
title: Token authentication specification
- sectiontitle: Registry storage drivers
section:
- path: /registry/storage-drivers/
title: Storage driver overview
- path: /registry/storage-drivers/oss/
title: Aliyun OSS storage driver
- path: /registry/storage-drivers/filesystem/
title: Filesystem storage driver
- path: /registry/storage-drivers/gcs/
title: GCS storage driver
- path: /registry/storage-drivers/inmemory/
title: In-memory storage driver
- path: /registry/storage-drivers/azure/
title: Microsoft Azure storage driver
- path: /registry/storage-drivers/s3/
title: S3 storage driver
- path: /registry/storage-drivers/swift/
title: Swift storage driver
- path: /glossary/
title: Glossary

Expand Down Expand Up @@ -1814,42 +1788,8 @@ manuals:
- path: /atomist/integrate/deploys/
title: Track deployments

- sectiontitle: Open-source projects
section:
- sectiontitle: Docker Registry
section:
- path: /registry/
title: Registry overview
- path: /registry/introduction/
title: Understand the Registry
- path: /registry/deploying/
title: Deploy a registry server
- path: /registry/configuration/
title: Configure a registry
- path: /registry/notifications/
title: Work with notifications
- sectiontitle: Recipes
section:
- path: /registry/recipes/
title: Recipes overview
- path: /registry/recipes/apache/
title: Authenticating proxy with apache
- path: /registry/recipes/nginx/
title: Authenticating proxy with nginx
- path: /registry/recipes/mirror/
title: Mirroring Docker Hub
- path: /registry/recipes/osx-setup-guide/
title: Running on macOS
- path: /registry/garbage-collection/
title: Garbage collection
- path: /registry/insecure/
title: Testing an insecure registry
- path: /registry/deprecated/
title: Deprecated features
- path: /registry/compatibility/
title: Compatibility
- path: /registry/help/
title: Getting help
- path: /registry/
title: Registry

- path: /release-notes/
title: Release notes
Expand Down
108 changes: 108 additions & 0 deletions develop/local-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
title: Run a local registry
description: >
Easily run a local image registry using the official registry image,
maintained by CNCF.
keywords: registry, distribution, local
---

This guide shows you how to run a local registry on your development machine.

## What's a registry?

A registry is where you store the container images you've built. It's also a
platform for downloading and distributing images.
[Docker Hub](../docker-hub/index.md) is one example of a hosted registry
service.

It's possible to run your own, local registry as well. In most cases, you'll
want to use a hosted registry service for managing your images. But there are
scenarios where you may need to use a self-hosted registry instead. For example,
if you need to have control where you store your images, or you want to fully
own your images distribution pipeline.

## Step one: Start the registry

You can use the `registry` official image to run a container registry on your
local machine.

Run the following command to start the registry service:

```console
$ docker run -d -p 5000:5000 --restart always --name registry registry:2
```

If you now run `docker ps` you should see the registry container running:

```console
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a71cdb4c020e registry:2 "/entrypoint.sh /etc…" 1 second ago Up 1 second 0.0.0.0:5000->5000/tcp registry
```

To verify that everything works, try using the registry API. Since you haven't
uploaded any images yet, it returns an empty list of repositories.

```console
$ curl localhost:5000/v2/_catalog
{"repositories":[]}
```

## Step two: Push an image

Now push an image to the registry. You can pull any existing image from Docker
Hub, change the image tag, and upload it to your local registry.

The Docker Buildx CLI provides a shorthand command for doing this:
`docker buildx imagetools create`. Run the following command, which takes the
latest version of the Alpine image and re-uploads it to your local registry:

```console
docker buildx imagetools create alpine --tag localhost:5000/alpine
```

Now try invoking the API again, and you should see the `alpine` there:

```console
$ curl localhost:5000/v2/_catalog
{"repositories":["alpine"]}
```

## Step three: Pull the image

Now that you've upload an image, try pulling it to your Docker client.

```console
$ docker pull localhost:5000/alpine
```

The `localhost:5000` part of the image name tells Docker to pull the `alpine`
image from your local registry. By default, if you leave out the hostname of an
image, Docker tries to pull the image from Docker Hub:

- `docker pull ubuntu` instructs Docker to pull an image named `ubuntu` from the
official Docker Hub. This is a shortcut for the longer
`docker pull docker.io/library/ubuntu` command.
- `docker pull example.com:1337/ubuntu` instructs Docker to pull the `ubuntu`
image from the registry located at `example.com:1337`.

## Step four: Clean up

Stop the registry container:

```console
$ docker stop registry
```

Remove the data volume created by the registry:

```console
$ docker rm -v registry
```

## Next steps

You can find the full documentation and more information on the registry image
in the
[distribution/distrubution GitHub repository](https://github.com/distribution/distribution){:
target="blank" rel="noopener"}.
34 changes: 34 additions & 0 deletions docker-hub/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Docker Hub APIs
description: >
Information on working with Docker Hub programmatically (HTTP API, CLI)
keywords: hub, api, cli, distribution, dvp
---

Docker Hub provides two HTTP APIs:

- The main Docker Hub API, see
[Docker Hub API documentation](/docker-hub/api/latest)
- The Docker Verified Publisher (DVP) API, see
[DVP API documentation](/docker-hub/api/dvp)

Docker also provides a
[Docker Hub CLI](https://github.com/docker/hub-tool#readme){: target="_blank"
rel="noopener" class="_"} tool (experimental) for interacting with Docker Hub
from the terminal. The CLI tool uses the Docker Hub API.

## OCI distribution compatibility

The Docker Hub APIs implement the API protocol defined in the
[OCI distribution specification v1.0.1](https://github.com/opencontainers/distribution-spec/releases/tag/v1.0.1){:
target="blank" rel="noopener" class="\_"}. There are a few ways that the Docker
Hub implementation deviates from the specification. Work is being done to
address the deviations and make Docker Hub compliant with the OCI specification.

The ways that Docker Hub deviates from the OCI specification are...

## Authentication

The
[Registry token authentication specification](../../registry/spec/auth/index.md)
describes the implementation for API authentication in Docker Hub APIs.
4 changes: 3 additions & 1 deletion docker-hub/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ GitHub and Bitbucket and push them to Docker Hub.
* [Webhooks](webhooks.md): Trigger actions after a successful push
to a repository to integrate Docker Hub with other services.

Docker provides a [Docker Hub CLI](https://github.com/docker/hub-tool#readme){: target="_blank" rel="noopener" class="_"} tool (currently experimental) and an API that allows you to interact with Docker Hub. Browse through the [Docker Hub API](/docker-hub/api/latest/){: target="_blank" rel="noopener" class="_"} documentation to explore the supported endpoints.
Docker Hub also provides HTTP APIs and an experimental CLI, see [Docker Hub APIs](./api/index.md).

## Getting started

The following section contains step-by-step instructions on how to easily get started with Docker Hub.

Expand Down
2 changes: 1 addition & 1 deletion engine/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ be re-used for all your future projects. And so on.
Hub](https://hub.docker.com/){: target="_blank" rel="noopener" class="_"} where thousands of
people have uploaded useful images: anything from Redis, CouchDB, PostgreSQL to
IRC bouncers to Rails app servers to Hadoop to base images for various Linux
distros. The [*registry*](../registry/index.md) also includes an official "standard
distros. The registry also includes an official "standard
library" of useful containers maintained by the Docker team. The registry itself
is open-source, so anyone can deploy their own registry to store and transfer
private containers, for internal server deployments for example.
Expand Down
9 changes: 0 additions & 9 deletions reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,5 @@ various APIs, CLIs, and file formats.
| API | Description |
|:------------------------------------------------------|:---------------------------------------------------------------------------------------|
| [Engine API](/engine/api/) | The main API for Docker, provides programmatic access to a daemon |
| [Registry API](/registry/spec/api/) | Facilitates distribution of images to the engine |
| [Docker Hub API](/docker-hub/api/latest/) | API to interact with Docker Hub |
| [DVP Data API](/docker-hub/api/dvp/) | API for Docker Verified Publishers to fetch analytics data |

## Drivers and specifications

| Driver | Description |
|:-------------------------------------------------------|:-----------------------------------------------------------------------------------|
| [Image specification](/registry/spec/manifest-v2-2/) | Describes the various components of a Docker image |
| [Registry token authentication](/registry/spec/auth/) | Outlines the Docker Registry authentication scheme |
| [Registry storage drivers](/registry/storage-drivers/) | Enables support for given cloud providers when storing images with Registry |

0 comments on commit bf7657c

Please sign in to comment.