Skip to content

Docker daemon won't start if a registry-mirror is configured in /etc/docker/daemon.json #36598

@mohr023

Description

@mohr023

Description

I have a Nexus 3 docker mirror running in a local server, which my machine points to using /etc/docker/daemon.json. I've tested it a few times, got it working, all good.

However, I was using a ridiculously old version of docker and decided to update it in order to use multistage builds (the version I was using couldn't handle the "AS" alias for stages), in fact, the newest I found(stable).

I completely removed docker, but left the daemon.json there, since I would need it anyway. Installed version 17.12.1 using a ".deb" and it immediately showed an error after the installation was done, showing that docker daemon was unable to start.

When trying to manually start it using dockerd, I got the following message:

invalid mirror: path, query, or fragment at end of the URI "http://192.168.1.201:8081/repository/docker-public/"

After about 30 minutes of searching, I've decided to try a different version, just to see what happens, and after downloading version 17.09.1, it started working again

Steps to reproduce the issue:

  1. Create /etc/docker/daemon.json and insert a registry-mirror, like the following:
{
        "registry-mirrors": ["http://192.168.1.201:8081/repository/docker-public/"]
}
  1. Update docker to version 17.12.1 using this link

Describe the results you received:
Error when starting docker daemon

Describe the results you expected:
Docker daemon should've started as usual

Additional information you deem important (e.g. issue happens only occasionally):
Also happens with 17.12.0

Output of docker version:

Client:
 Version:	17.12.1-ce
 API version:	1.35
 Go version:	go1.9.4
 Git commit:	7390fc6
 Built:	Tue Feb 27 22:17:40 2018
 OS/Arch:	linux/amd64

Output of docker info:

Can't print, since daemon won't start.

Additional environment details (AWS, VirtualBox, physical, etc.):
Using a regular ubuntu 16.04 installation behind a corporate firewall (usually a problem, but not this time I guess)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions