Skip to content

Conversation

@mdlinville
Copy link

Proposed changes

Rewrites and reorganization
Also add information about pushing non-distributable layers
into a private registry

Fixes #3433

Unreleased project version (optional)

Docker 17.06

PTAL @stevvooe @dmcgowan @thaJeztah @cpuguy83

@mdlinville mdlinville added this to the engine/17.06 milestone Jun 3, 2017
@mdlinville
Copy link
Author

PTAL @friism

docker run -d -p 5000:5000 --restart=always --name registry registry:2
## Run a local registry

Use a command like the following to start the registry container:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should point out that the example here is just for testing / trying out, because;

  • it's insecure (there's no TLS, nor authentication in place, and the port is published, so anyone has access to your registry)
  • there's no volume used, so images are stored on the container's filesystem; removing the container removes all your images

In Docker 17.06 and higher, you can configure the Docker daemon to allow
pushing non-distributable layers to private registries, in this scenario.
**This is only useful in air-gapped set-ups in the presence of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, this is also useful in bandwidth-constrained setups, or setups where one wants to not be dependent on fetching the base layers from MS servers. I have no quarrel with the current formulation though.

> **Warning**: Non-distributable artifacts typically have restrictions on
> how and where they can be distributed and shared. Only use this feature
> to push artifacts to private registries and ensure that you are in
> compliance with > any terms that cover redistributing non-distributable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bonus >

@mdlinville
Copy link
Author

Addressed feedback.

Mac; for example: `sudo ifconfig lo0 alias 10.200.10.1/24`, and make sure that
your service is listening on this address or `0.0.0.0` (ie not `127.0.0.1`).
Then containers can connect to this address.
The Mac has a changing IP address (or none if you have no network access). From
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be clarified to OSX, so it is not confused with MAC Address.

5. Initialize or join the swarm.
## Use a separate interface for control and data traffic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to registry deployment?

By default, your registry data is persisted as a
[docker volume](/engine/tutorials/dockervolumes.md) on the host filesystem.
Just as any other container, you can use a bind mount instead. The following
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a bind mount or volume instead"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Line 134 already says it defaults to using a volume.

### Customize the storage back-end
You should usually consider using [another storage backend](./storage-drivers/index.md) instead of the local filesystem. Use the [storage configuration options](./configuration.md#storage) to configure an alternate storage backend.
Instead of the local filesystem, you can use a different storage back-end by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to compare this to usage of a volume.


```bash
$ docker run -d \
-p 5000:5000 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this example without port 5000? The section above makes that promise then the example breaks that promise. ;)

### Use an insecure registry (testing only)

While rarely advisable, you may want to use self-signed certificates instead, or use your registry in an insecure fashion. You will find instructions [here](insecure.md).
It is possible to use a self-signed certificate, or to use our registry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can still setup verification with a self-signed certificate that isn't used for testing.


> **Warning**:
> You **cannot** use authentication with an insecure registry. You have to [configure TLS first](deploying.md#running-a-domain-registry) for this to work.
> You **cannot** use authentication with an insecure registry. You must
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...with authentication schemes that send credentials as clear text.

Misty Stanley-Jones added 2 commits June 6, 2017 15:25
Also add information about pushing non-distributable
layers to private registries
@mdlinville
Copy link
Author

@stevvooe the first two bits of feedback you had were for unrelated changes that just indicated this patch needed a rebase. Maybe @londoncalling can make note of them to be changed elsewhere.

@mdlinville
Copy link
Author

Addressed feedback and added a service example that uses secrets to store the TLS certificate material.

@mdlinville
Copy link
Author

LGTM, merging into vnext-engine.

@mdlinville mdlinville merged commit cd357f4 into docker:vnext-engine Jun 7, 2017
@mdlinville mdlinville deleted the foreign-layers branch June 7, 2017 17:34
mdlinville pushed a commit that referenced this pull request Jun 16, 2017
* Reorganize registry deployment guide

Also add information about pushing non-distributable
layers to private registries

Also add an example of running a registry as a swarm service
mdlinville pushed a commit that referenced this pull request Jun 20, 2017
* Reorganize registry deployment guide

Also add information about pushing non-distributable
layers to private registries

Also add an example of running a registry as a swarm service
mdlinville pushed a commit that referenced this pull request Jun 26, 2017
* Reorganize registry deployment guide

Also add information about pushing non-distributable
layers to private registries

Also add an example of running a registry as a swarm service
mdlinville pushed a commit that referenced this pull request Jun 28, 2017
* Reorganize registry deployment guide

Also add information about pushing non-distributable
layers to private registries

Also add an example of running a registry as a swarm service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants