Docker Community Forums

Share and learn in the Docker community.

Repository/tag: invalid reference format


(Bladerunner512) #1

How do you build image with Dockerfile using private registry?

My private Docker registry works fine, but unable to build from images in registry.

Getting error:
Error parsing reference: “FROM my.docker-repo.com:5000/java:8” is not a valid repository/tag: invalid reference format

$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
my.docker-repo.com:5000/java 8 d23bdf5b1b1b 8 months ago 643 MB

Docker version:
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: 276fd32
Built: Fri Jun 23 20:13:39 2017
OS/Arch: linux/amd64

Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: 276fd32
Built: Fri Jun 23 20:13:39 2017
OS/Arch: linux/amd64
Experimental: false


(Think) #2

you could retag it as my.docker-repo.com:5000/YOUR_ORGANIZATION/java:8.
Just try to mimic that you would upload it to the global registry (so name it YOUR_ORGANIZATION/java:8), but just prefix it with your private repo my.docker-repo.com:5000


(Bladerunner512) #3

Well done, that works. Surprised because it works everywhere else without ORG, but that’s a good practice anyway. The private registry is only for my ORG so I thought it would be redundant not mandatory. Thanks for the help.