Skip to content

Disallow using legacy (V1) registries #35751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2017

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Dec 8, 2017

Interacting with v1 registries was deprecated in Docker 1.8.3, disabled by default
in Docker 17.06, and scheduled for removal in Docker 17.12.

This patch disallows enabling V1 registry through the --disable-legacy-registry
option, and the "disable-legacy-registry": false option in the daemon configuration
file. The actual V1 registry code is still in place, and will be removed separately.

With this patch applied:

$ dockerd --disable-legacy-registry=false
ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported

Or, when setting through the daemon.json configuration file

$ mkdir -p /etc/docker/
$ echo '{"disable-legacy-registry":false}' > /etc/docker/daemon.json
$ dockerd
ERROR: The 'disable-legacy-registry' configuration option has been removed. Interacting with legacy (v1) registries is no longer supported

This is a smaller patch than #35479, which requires additional review.

- Description for the changelog

* Remove support for legacy (v1) registries. Support for v1 registries was deprecated in docker 1.8, disabled by default in docker 17.06, and is now removed. [moby/moby#35751](https://github.com/moby/moby/pull/35751)

Interacting with v1 registries was deprecated in Docker 1.8.3, disabled by default
in Docker 17.06, and scheduled for removal in Docker 17.12.

This patch disallows enabling V1 registry through the `--disable-legacy-registry`
option, and the `"disable-legacy-registry": false` option in the daemon configuration
file. The actual V1 registry code is still in place, and will be removed separately.

With this patch applied:

    $ dockerd --disable-legacy-registry=false
    ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported

Or, when setting through the `daemon.json` configuration file

    $ mkdir -p /etc/docker/
    $ echo '{"disable-legacy-registry":false}' > /etc/docker/daemon.json
    $ dockerd
    ERROR: The 'disable-legacy-registry' configuration option has been removed. Interacting with legacy (v1) registries is no longer supported

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the disallow-v1-registries branch from 85758dd to 8d6df8a Compare December 9, 2017 10:25
@thaJeztah
Copy link
Member Author

hmf forgot to remove some of the tests; updated

@thaJeztah
Copy link
Member Author

experimental is a flaky test; #23516

11:37:09 ----------------------------------------------------------------------
11:37:09 FAIL: docker_api_swarm_node_test.go:76: DockerSwarmSuite.TestAPISwarmNodeDrainPause
11:37:09 
11:37:09 [d80827dac28d1] waiting for daemon to start
11:37:09 [d80827dac28d1] daemon started
11:37:09 
11:37:09 [d91ac5a1c8813] waiting for daemon to start
11:37:09 [d91ac5a1c8813] daemon started
11:37:09 
11:37:09 docker_api_swarm_node_test.go:105:
11:37:09     waitAndAssert(c, defaultReconciliationTimeout*2, reducedCheck(sumAsIntegers, d1.CheckActiveContainerCount, d2.CheckActiveContainerCount), checker.Equals, instances)
11:37:09 docker_utils_test.go:465:
11:37:09     c.Assert(v, checker, args...)
11:37:09 ... obtained int = 2
11:37:09 ... expected int = 1
11:37:09 ... output: "1db9f3ea5a76\n9bc28e19a80a\n"
11:37:09 
11:37:09 [d80827dac28d1] exiting daemon
11:37:09 [d91ac5a1c8813] exiting daemon

Copy link
Member

@boaz0 boaz0 left a comment

Choose a reason for hiding this comment

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

LGTM 🥇

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@vieux vieux left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants