Remove --port and update --publish for services to support syntaxes

Add support for simple and complex syntax to `--publish` through the
use of `PortOpt`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2016-12-08 22:32:10 +01:00
parent f099e134e4
commit 7fbc616b47
5 changed files with 37 additions and 102 deletions

View File

@ -364,6 +364,7 @@ func TestUpdatePortsRmWithProtocol(t *testing.T) {
assert.Equal(t, portConfigs[0].TargetPort, uint32(82))
}
// FIXME(vdemeester) port to opts.PortOpt
func TestValidatePort(t *testing.T) {
validPorts := []string{"80/tcp", "80", "80/udp"}
invalidPorts := map[string]string{