Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udp port mapping not working #83

Closed
arnestorksen opened this issue Jan 28, 2015 · 3 comments
Closed

udp port mapping not working #83

arnestorksen opened this issue Jan 28, 2015 · 3 comments
Labels
Milestone

Comments

@arnestorksen
Copy link

Using docker command-line, it is possible to bind udp ports. The syntax for this is to append /udp to the port number. The plugin does not support this.

I'm trying to use this configuration:

<image>
    <name>progrium/consul:latest</name>
    <alias>consul</alias>
    <run>
        <volumes>
            <bind>
                <volume>/var/run/docker.sock:/tmp/docker.sock</volume>
            </bind>                                
        </volumes>                                
        <ports>
            <port>8400:8400</port>
            <port>8500:8500</port>
            <port>8600:53/udp</port>
        </ports>
    </run>
</image>

I get this error:
Cannot parse port mapping: Port mappings must be given in the format

<hostPort>:<mappedPort> or <bindTo>:<hostPort>:<mappedPort>

The syntax is mentioned here:
https://docs.docker.com/userguide/dockerlinks/

You can also bind UDP ports by adding a trailing /udp. For example:

$ sudo docker run -d -p 127.0.0.1:5000:5000/udp training/webapp python app.py
@rhuss
Copy link
Collaborator

rhuss commented Feb 3, 2015

Thanks for the report, I'm going to fix this for the next version.

@rhuss rhuss added this to the 0.11.1 milestone Feb 3, 2015
@rhuss rhuss added the bug label Feb 3, 2015
rhuss added a commit that referenced this issue Feb 6, 2015
@jgangemi
Copy link
Collaborator

this has been fixed - closing

@tmckeag
Copy link
Contributor

tmckeag commented Oct 7, 2016

Just reproduced this issue with 0.16.4. Error message is a little different. The value
<port>43366/udp</port>
Yields
Non numeric port 43366/udp specified in port mapping: For input string: "43366/udp"

leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this issue Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants