Skip to content

--insecure-registry should be on "docker pull" #8887

@abourget

Description

@abourget

Hi folks, thanks for all your great work.

I was previously running a "library/registry" on localhost:5000. With Docker 1.3+, I was required to run docker with --insecure-registry localhost:5000. Doing so did nothing, until I discovered I needed to run docker, as in daemon, with those parameters.

It would be very useful to have that handled directly by docker pull, and not have to restart the whole thing and tweak system-level settings when you discover you need to use a local unsecure registry. EDIT: As mentioned in the comments, it would also be very useful to allow any registry to be unsecure, not just named ones, as Docker sometimes provides random ports, and some environments have many registries popping in and out of existence.

It is currently read here: https://github.com/docker/docker/blob/master/docker/daemon.go#L43 (while running the daemon), and it's checked while pulling in https://github.com/docker/docker/blob/master/graph/pull.go#L116 .. maybe we could add yet another switch to pull like --insecure and tweak that would forcefully make it secure == false ?

I don't have a docker development setup ready, but if you think it's a good idea.. I could try to implement it.

Linux cerise 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Docker version 1.3.1, build 4e9bbfa
Containers: 5
Images: 607
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 618
Execution Driver: native-0.2
Kernel Version: 3.13.0-32-generic
Operating System: Ubuntu 14.04.1 LTS
Debug mode (server): false
Debug mode (client): true
Fds: 10
Goroutines: 11
EventsListeners: 0
Init Path: /usr/bin/docker
Username: abourget
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionImage Distributionkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions