Connect to a container running on bridge network

Hello,

I have created a docker bridge network on my host using the following command -

docker network create --driver=bridge --subnet=172.28.0.0/16 --ip-range=172.28.5.0/24 --gateway=172.28.5.254 br0

I created a centos container & attached it to the bridge network using the following command -

docker run -it -d -v /etc/localtime:/etc/localtime:ro --network=br0 --ip=172.28.5.1 --name=container1 centos /usr/bin/process_start.py’

This container is on br0, other applications talking to it also are deployed on br0. This is the required behavior, but sometimes for debugging purposes, we need to connect to the container without changing it’s network.

Is there a way to connect to the docker container running on the 172.28.5.1 IP from outside the host? Maybe temporarily create a tunnel or a reverse proxy to help out in this case.

Thanks
Bhushan Pathak