Write-up can be found on medium
$ docker build -t image-cache:v1 .
$ docker service create --mode global --name nginx --with-registry-auth \
--publish published=80,target=80,mode=host \
image-cache:v1