Commit Graph

15 Commits

Author SHA1 Message Date
Daniel, Dao Quang Minh cd2b019214 sort ports mapping before allocating
prioritize the ports with static mapping before dynamic mapping. This removes
the port conflicts when we allocate static port in the reserved range
together with dynamic ones.
When static port is allocated first, Docker will skip those when determining
free ports for dynamic ones.

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-04-30 02:18:04 +00:00
Tibor Vass 53582321ee Remove jobs from daemon/networkdriver/bridge
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-04-08 18:50:29 -04:00
Chen Hanxiao 2706426434 nat: enable upper case proto
We only accepted lower case proto: tcp, udp.
This patch will enable us to use upper case
of proto such as: EXPOSE 1234/TCP

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-06 14:07:17 +08:00
Alexander Morozov a75b02fe72 Fix format calls as suggested by vet
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:12:03 -08:00
Srini Brahmaroutu 2338a9cf5a add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-02 23:21:26 +00:00
Srini Brahmaroutu fd774a818c adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2014-10-31 23:06:30 +00:00
Doug Davis 658a9d0f47 Fix parsing of proto/port
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-12 11:39:14 -07:00
Sven Dowideit e4d2a8231a add -p PORT as a valid format specification
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2014-09-09 11:16:02 +10:00
Erik Hollensbe 99a864431d First stab at nat tests.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-08 15:01:12 -07:00
Erik Hollensbe 3c49cb17fb fix parsing of hostnames when we actually want IP addresses.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-08 15:01:10 -07:00
Erik Hollensbe 4398108433 Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-29 13:09:10 -07:00
Victor Vieux b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Victor Vieux 0633b12b28 add proto validation at parse
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-06-02 23:03:10 +00:00
Alexander Larsson a304dcef00 nat: Fix --expose protocol parsing
A command like:
 docker run --expose 5353/tcp -P fedora sleep 10

Currently fails with:
Error: Cannot start container 5c558de5f0bd85ff14e13e3691aefbe531346297a27d4b3562732baa8785b34a: unknown protocol

This is because nat.SplitProtoPort() confuses the order of the port and
proto in 5353/tcp, assuming the protocol is first. However, in all other
places in docker the protocol is last, so the fix is just to swap these.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-05-05 12:54:10 +02:00
Solomon Hykes 3ecd8ff0c8 New package `nat`: utilities for manipulating the text description of network ports.
This facilitates the refactoring of commands.go

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-11 16:51:01 -08:00