How to use port mapping / forwarding

update: maybe some information that is needed to solve this: i start my containers in the network “host” so that they are accessible over the IP of the host (i.e. something like 192.168.1.XXX instead of docker’s IP 172.17.0.1) …


hello everyone

just a short question and I imagine it is quite simple but I cannot get it right:
let’s say I deploy a container that runs normally on port 8000. Since port 8000 is already used by another app I wanna map that port to 8001 (as when starting a container just by using docker cli)

so creating a new contrainer in portainer and directly at the beginning “map additional port” --> host: 8001 --> container: 8000

that’s how I tried it and it still creates the container only accessible over webgui on port 8000 …

does anyone know what im understanding wrong here?

thanks for your help

Hi
In portainer configuration section user can publish port
https://documentation.portainer.io/v2.0/services/options/

to know more about publishing ports pl refer below links

image