Docker login is Succeeded.We have issue while pulling docker images via Nexus. See the below errors.
Step 1 :
docker login -u username -p password http://:port
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
Description Log in to a Docker registry Usage docker login [OPTIONS] [SERVER] Options Name, shorthand Default Description --password , -p Password --password-stdin Take the password from stdin --username , -u...
Login Succeeded
Step2 :
Command : docker pull http://:port/java
logs :
Using default tag: latest
Trying to pull repository http://:port/java …
latest: Pulling from http://:port/java
5040bd298390: Pulling fs layer
fce5728aad85: Pulling fs layer
76610ec20bf5: Pulling fs layer
60170fec2151: Waiting
e98f73de8f0d: Waiting
11f7af24ed9c: Waiting
49e2d6393f32: Waiting
bb9cdec9c7f3: Waiting
error pulling image configuration: unknown blob
Could you please guide here, what is the issue ? But I can download the docker images directly from docker registry.
rseddon
(Rich Seddon)
August 22, 2019, 10:51pm
2
Your syntax is wrong, docker login and docker pull don’t include the protocol, so you should be using “docker login host:port” and “docker pull host:port”.
Description Pull an image or a repository from a registry Usage docker pull [OPTIONS] NAME[:TAG|@DIGEST] Options Name, shorthand Default Description --all-tags , -a Download all tagged images in the repository...
Also Docker expects to talk to a remote that is running https, not http. You’ll need to configure Nexus to use SSL for communications, and use an https connector port in the docker repository.
https://help.sonatype.com/display/NXRM3/Configuring+SSL#ConfiguringSSL-InboundSSL-ConfiguringtoServeContentviaHTTPS
Finally, docker is picky about ssl certificates. If you’re going to use a self signed one, see here:
rseddon:
docker login host:port
Thanks for the reply. Somehow the nexus word is getting removed. But I am using the correct syntax for docker pull from nexus.
docker login -u -p nexus host:port
docker pull nexushost:port/java
Yes, My nexus is running over http. we have set up to use the http registry in (daemon.json) file . Please refer the below link :
rseddon
(Rich Seddon)
August 26, 2019, 8:09pm
4
See the disclaimer at the top of that blob post, saying that it “may no longer be accurate”.
rseddon:
ay no longer be accurate
So you are suggesting docker will not work with insecure nexus registry with http ?
rseddon
(Rich Seddon)
August 26, 2019, 10:19pm
6
It can work, but only in limited ways, and it doesn’t seem very well tested: Test an insecure registry | Docker Documentation