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

Expose SCTP port support #6294

Closed
muxalko opened this issue Oct 24, 2018 · 4 comments
Closed

Expose SCTP port support #6294

muxalko opened this issue Oct 24, 2018 · 4 comments

Comments

@muxalko
Copy link

muxalko commented Oct 24, 2018

Hello Dear Support!

Is your feature request related to a problem? Please describe.

My problem is that compose only supports TCP and UDP port protocol types when exposing services ports, although it was already [implemented]
(moby/moby#9689 (comment)) in docker since 18.03.
And explained here

You can also bind UDP and SCTP (typically used by telecom protocols such as SIGTRAN, Diameter, and S1AP/X2AP) ports by adding a trailing /udp or /sctp. For example:

$ docker run -d -p 127.0.0.1:80:5000/udp training/webapp python app.py

Trying to run the following:

$ docker-compose run -p 3868:3868/sctp diameter
Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 127, in perform_command
  File "compose/cli/main.py", line 873, in run
  File "compose/cli/main.py", line 1328, in run_one_off_container
  File "compose/service.py", line 326, in create_container
  File "compose/service.py", line 856, in _get_container_create_options
  File "compose/service.py", line 1637, in build_container_ports
  File "site-packages/docker/utils/ports.py", line 65, in split_port
  File "site-packages/docker/utils/ports.py", line 43, in _raise_invalid_port
ValueError: Invalid port "3868:3868/sctp", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
[35556] Failed to execute script docker-compose

The same with TCP is success:

golan@ppcc-cgr-ptk-node-01:~/cgrates_docker$ docker-compose run -p 3868:3868/tcp diameter
2018/11/11 06:02:49 <c60f53b> [INFO] Starting Diameter service  OK

I was wandering if you are planning to align compose acceptable values to respect expose port using SCTP protocol and convert to correct docker commands.
If I understand correctly, that concludes only extending the list of allowed values (tcp,udp,sctp)

Describe the solution you'd like
I would like docker-compose to respect sctp as it is an industry standard and widely used in telco's environments.
The example docker-compose.yml could look like:

version: "3.x"
services:
  diameter:
      image: diameter
      container_name: diameter
      ports:
          - "3868:3868/sctp"

Describe alternatives you've considered
I've considered running docker manually with -p flag.
For example ... -p 3868:3868/sctp

Additional context
As an additional context, I can provide few links related:
https://docs.docker.com/network/links/
http://laforge.gnumonks.org/blog/20170503-docker-overhyped/

Thanks,
Michael

@shin-
Copy link

shin- commented Oct 24, 2018

Hi @muxalko !

We have a template for feature requests - please use it!

@muxalko muxalko changed the title Expose SCTP port expose support Expose SCTP port support Oct 25, 2018
@muxalko
Copy link
Author

muxalko commented Nov 13, 2018

Hello Shin,
Until you find a time to look into this, is there any workaround we can use to fire up a container with sctp exposed port?
Currently, the whole application bootstrap is automated with docker-compose, except this very service, which I must run manually with 'docker run ....'

I was thinking of running a container with docker sock mounted , and run docker sctp expose command at entrypoint. Is that good approach ?
I mean something like that: http://tdeheurles.github.io/acting-on-docker-from-inside-docker/

Thanks in advance,
Michael

@teknoraver
Copy link

Beware of this cgroups limit issue:

https://access.redhat.com/security/cve/cve-2019-3874

@ijc
Copy link

ijc commented Mar 27, 2019

AIUI the support from docker/docker-py#2281 will enable this without further changes. So, closing.

@ijc ijc closed this as completed Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants