mariotoffia / FluentDocker

Use docker, docker-compose local and remote in tests and your .NET core/full framework apps via a FluentAPI
Apache License 2.0
1.33k stars 98 forks source link

HostIpMapping() method broken #259

Closed Agasd closed 2 years ago

Agasd commented 2 years ago

Example code: var docker = new Ductus.FluentDocker.Builders.Builder().UseContainer() .UseImage("hello-world") .HostIpMapping("example.com","1.1.1.1") .HostIpMapping("example2.com","1.1.1.2") .Build() .Start(); Exception: Ductus.FluentDocker.Common.FluentDockerException: 'Could not create Service from hello-world with command , args , and parameters --add-host=--add-host=example.com:1.1.1.1--add-host=example2.com:1.1.1.2. Result: invalid argument "--add-host=example.com:1.1.1.1--add-host=example2.com:1.1.1.2" for "--add-host" flag: invalid IP address in add-host: "1.1.1.1--add-host=example2.com:1.1.1.2" See 'docker create --help'.'

Submitted PR with simple fix