private String serverIdFor(RegistryAuth registryAuth) {
    if (serverId != null) {
      return serverId;
    }
    if (registryAuth.serverAddress() != null) {
      return registryAuth.serverAddress();
    }
    return "index.docker.io";
  }
Builds the registryAuth object from server details.
@return {@link RegistryAuth}
@throws MojoExecutionException
src/main/java/com/spotify/docker/AbstractDockerMojo.java