Unable to create a docker service from private registry

Issue Type: Docker Swarm native, swarm worker not able to pull image from private registry
OS Version/Build: Red Hat Enterprise Linux Server release 7.4 (Maipo)/Docker version 1.12.6, build ec8512b/1.12.6

we want to setup private registry to host our own application images, if a repository having public access we could create a services using docker service command but when we change it to private we can not run docker service command eventhough given full access repo wrt user.

What’s your setup? Where is located the registry host?

Be sure that:

  • the privateregistry host is reachable from the swarm node you’re using to deploy the service
  • the full private registry host in included in the image name

This is an example from the doc:

docker service  create \
   --with-registry-auth \
   --name my_service \
   registry.example.com/acme/my_image:latest