Commit Graph

10 Commits

Author SHA1 Message Date
Sami Tabet 63e5c29e00 Fix mapping a range of host ports to a single container port
Signed-off-by: Sami Tabet <salph.tabet@gmail.com>
2018-06-12 11:54:02 +02:00
Sebastiaan van Stijn 363335ec9b
Warn when using host-ip for published ports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-21 12:49:47 -07:00
Wataru Ishida 995006c164 Support SCTP port mapping
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-02-21 12:19:38 +09:00
Vincent Demeester d7f6563efc
Update cli imports to using local package
Also, rename a bunch of variable to not *shadow* the `opts` package
name.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-05-15 14:45:19 +02:00
Vincent Demeester 7fa9161585 Make sure we validate simple syntax on service commands
We ignored errors for simple syntax in `PortOpt` (missed that in the
previous migration of this code). This make sure we don't ignore
`nat.Parse` errors.

Test has been migrate too (errors are not exactly the same as before
though -_-)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-05-15 11:57:21 +02:00
Tony Abboud 438279688c Add error checking for hostPort range
This fix catches the case where there is a single container port
and a dynamic host port and will fail out gracefully
Example docker-compose.yml snippet:
    port:
        ports:
            - "8091-8093:8091"
            - "80:8080"

Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-05-15 11:57:21 +02:00
Vincent Demeester 16bbd3441a Make --publish-rm precedes --publish-add, so that add wins
`--publish-add 8081:81 --publish-add 8082:82 --publish-rm 80
--publish-rm 81/tcp --publish-rm 82/tcp` would thus result in 81 and
82 to be published.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-05-15 11:57:20 +02:00
Vincent Demeester 016a56b064 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>
2017-05-15 11:57:20 +02:00
Victor Vieux 4d5944cd51 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-05-15 11:57:20 +02:00
Jana Radhakrishnan 7426b9d61b Add support for host port PublishMode in services
Add api/cli support for adding host port PublishMode in services.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2017-05-15 11:57:20 +02:00