Community discussions

MikroTik App
 
User avatar
timo182
just joined
Topic Author
Posts: 5
Joined: Fri Mar 31, 2023 6:06 pm
Location: Earth

Set port mapping(-p) for new container

Thu May 04, 2023 7:15 pm

Hi, just can't understand how to set up container to use port mapping like this -p 8080:8080
Does somebody know how to set it?
 
User avatar
own3r1138
Long time Member
Long time Member
Posts: 680
Joined: Sun Feb 14, 2021 12:33 am
Location: Pleiades
Contact:

Re: Set port mapping(-p) for new container

Thu May 04, 2023 7:21 pm

/ip firewall nat
 
User avatar
timo182
just joined
Topic Author
Posts: 5
Joined: Fri Mar 31, 2023 6:06 pm
Location: Earth

Re: Set port mapping(-p) for new container

Thu May 04, 2023 7:29 pm

/ip firewall nat
No, I mean how to configure both "side", not only external but mainly internal to container
For example this container required to pass -p 8080:8080 during run procedures, but I can't understand how to achieve it in routeros
https://hub.docker.com/r/flcontainers/guacamole
 
User avatar
own3r1138
Long time Member
Long time Member
Posts: 680
Joined: Sun Feb 14, 2021 12:33 am
Location: Pleiades
Contact:

Re: Set port mapping(-p) for new container

Thu May 04, 2023 7:36 pm

Internal? Elaborate, please.
The host is your ROS. So you should add a rule to dst-nat your public-ip:8080 to your veth-ip.
Parameters
-p 8080:8080 - Binds the service to port 8080 on the Docker host, required
 
User avatar
timo182
just joined
Topic Author
Posts: 5
Joined: Fri Mar 31, 2023 6:06 pm
Location: Earth

Re: Set port mapping(-p) for new container

Thu May 04, 2023 8:28 pm

Internal? Elaborate, please.
The host is your ROS. So you should add a rule to dst-nat your public-ip:8080 to your veth-ip.

I mean container just not expose 8080 port to outside if I don't specify -p 8080:8080 during run procedure( :8080 part)
I was trying to go to container shell and there simply no service that listen on 8080 port
Looks like I need to find out another container image or reconfigure this one to expose 8080 port regardless of whether this parameter was passed at startup or not

Who is online

Users browsing this forum: No registered users and 1 guest