简体   繁体   中英

How to ssh into a docker container running on a different network?

I have a docker container running on a local host with private ip 172.17.0.3. I want this to be publicly accesible over the internet so that anyone in the world can ssh into this docker container. Is this possible and if possible how? I am trying to create a small public cloud filled with instances of docker containers in my local network which people from all over the world can access and I am sitting behind a NAT which might cause issues.

Any help will be appreciated.

Forward port from inside container to the host please, for example

docker run -it --name mydocker -p 8080:80 docker/tensorflow:latest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM