Using <https://github.com/docker-java/docker-java> and looking for a way to add the `--with-registry-auth` option from <https://docs.docker.com/v17.12/engine/reference/commandline/service_create/#options>

```java
val createCmd = dockerClient.createServiceCmd(
                ServiceSpec()
                        .withName("name")

                        .withTaskTemplate(TaskSpec()
                                .withContainerSpec(ContainerSpec()
                                        .withEnv(envs)
                                        .withImage("image")
                                        .withMounts(mounts)
                                )
                                .withNetworks(networks)
                                .withPlacement(ServicePlacement()
                                        .withConstraints(constraints))
                        )
        )

```

To clarify this more:

I am looking for docker-java way to do this command (this does work!):

```
docker service create --with-registry-auth --constraint 'node.labels.mynodeid==7' myprivateregistry.foo:5000/imagename:latest

```

Removing the `--with-registry-auth` like this

```
docker service create --constraint 'node.labels.mynodeid==7' myprivateregistry.foo:5000/imagename:latest

```

will bringt up this error: `No such image: myprivateregistry.foo:5000/imagename:latest` because the credentials, which are valid btw, are not passed to the node.