Docker registry login failure

My goal is to stand up Nexus Repository Manager and configure it as a Docker registry via script. I am deploying this in a kubernetes cluster and intend to use the helm chart.

The below is me testing it on my local machine via docker and virtualbox.

I stand up a nexus repository manager, successfully use the API to create a Docker internal repo and fail to be able to log in to the Docker registry and therefore am not able to push and pull images to it.

I have been testing this on Docker on the desktop with the GitHub repo from Sonatype class

I create the repository using the following repo docker.json docker





“content”:“repository.createDockerHosted(‘docker-internal’,null, null)”


Docker login192.168.99.100:8081/repository/docker-internal –u admin –p admin123

Error msg is …

docker login192.168.99.100:8081 -u admin -p admin123

WARNING! Using --password via the CLI is insecure. Use --password-stdin.

Error response from daemon: Gethttps:// http: server gave HTTP response to HTTPS client

There are a few problems here. First, you can’t connect using “/repository/docker-internal”, because docker registries can only run on context path “/”. You’ll need to define a connector port in the repository configuration, and use that to connect.

See here for other strategies you can use to work around this limitation:

Second, docker by default requires https connections from registries. And it is somewhat picky about the certificates it allows. You can try using the “–insecure” flag to work around that, but a better solution is here: