3bc3f0390e
For backward compatibility: if no custom options are provided for the network, and only a single network is specified, omit the endpoint-configuration on the client (the daemon will still create it when creating the container) This fixes an issue on older versions of legacy Swarm, which did not support `NetworkingConfig.EndpointConfig`. This was introduced in5bc09639cc(#1767) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit4d7e6bf629) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>