mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Support EXPOSE with port ranges
Fixes issue #12293. EXPOSE directive in images should mirror the --expose parameter. Specifically `EXPOSE 20000-20100/tcp` should work the same as `--expose 20000-20100/tcp` Signed-off-by: Colin Bendell <colin@bendell.ca>
This commit is contained in:
@ -53,11 +53,11 @@ func ParseFilters(filter []string) (map[string][]string, error) {
|
||||
return filters, nil
|
||||
}
|
||||
|
||||
// createExpose parses user-provided exposed port definitions and converts them
|
||||
// CreateExpose parses user-provided exposed port definitions and converts them
|
||||
// into SpecGen format.
|
||||
// TODO: The SpecGen format should really handle ranges more sanely - we could
|
||||
// be massively inflating what is sent over the wire with a large range.
|
||||
func createExpose(expose []string) (map[uint16]string, error) {
|
||||
func CreateExpose(expose []string) (map[uint16]string, error) {
|
||||
toReturn := make(map[uint16]string)
|
||||
|
||||
for _, e := range expose {
|
||||
|
Reference in New Issue
Block a user