install docker container - docker run - invalid reference format

install docker container - docker run - invalid reference format



From the docker quickstart terminal on Windows 7 64-bit, I'm following the instructions to install this docker container. I run the command,


docker run http://wiki.openstreetmap.org/wiki/nominatim



and I get this error:


c:program filesdocker toolboxdocker.exe: invald reference format.



I can't find any information about this error related to this container.






first pull the image, then run the container, i think you need to execute http:// inside the docker container. not as an argument to docker, so it is invalid.

– Tharanga Abeyseela
Sep 16 '18 at 1:46






if the answer solves your problem please consider accepting it.

– Mani
Sep 17 '18 at 5:13




3 Answers
3



The image name that you have specified to pull and run is wrong. The image name should be mediagis/nominatim.


mediagis/nominatim



Your docker run command should be


docker run mediagis/nominatim



It is not necessary to pull the image first and run it. By default docker run first tries to find such image in your machine if not then it tries to download from docker repository.



If you specify URL format it directly downloads from private repo if such image is not found in your machine.



Brief Explanation:



Docker takes whatever that is in form of url as an image and the reason for this is sometimes you may want to run image from your private repository. So here http://wiki.openstreetmap.org/wiki/nominatim is considered as an image called wiki/nominatim from a private repo called wiki.openstreetmap.org by docker and the format of private repo and image is wrong . It should be <domain.com>/image:tag where tag is optional. You are not supposed to provide protocol (http://). See this for reference Hence the error is thrown as invalid reference format.


wiki/nominatim


wiki.openstreetmap.org


<domain.com>/image:tag


tag



If you would have given as docker run wiki.openstreetmap.org/wiki/nominatim it would have tried to download image called wiki/nominatim from wiki.openstreetmap.org private repo with latest tag. Since no such repo and image exists it reports Error response from daemon: error parsing HTTP 404 response body as the url throws 404: Not Found when docker daemon tries connecting to it.


docker run wiki.openstreetmap.org/wiki/nominatim


wiki/nominatim


wiki.openstreetmap.org


latest


404: Not Found



References:



Note: Unless you specify tag name which is optional docker always downloads latest tag from repo.


latest



You need to pull the image first , then run the container. according to your docker command, you are trying to access a website, it is not a docker container image. so that's why it is giving you the invalid reference format.



docker run http://wiki.openstreetmap.org/wiki/nominatim



does non make any sense syntactically ...



In any case the correct command to get the latest image is:



sudo docker pull mediagis/nominatim:3.1



Notice that each version has its own installation instructions (versions prior to 3.1 were structurally different), so please do refer to the appropriate section:



https://hub.docker.com/r/mediagis/nominatim/tags/



However I do agree with you that



docker run --restart=always -p 6432:5432 -p 7070:8080 -d -v /home/me/nominatimdata/postgresdata:/var/lib/postgresql/9.5/main nominatim sh /app/start.sh



Should be



docker run --restart=always -p 6432:5432 -p 7070:8080 -d -v /home/me/nominatimdata/postgresdata:/var/lib/postgresql/9.5/main mediagis/nominatim sh /app/start.sh



instead. The installation instructions need updating there.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)