Similarly, you can open a browser on the mac host to access the container service. Create a new container from the image Ubuntu LNMP and map the port ➜ ~ docker run -i -t -h lnmp -name ubuntu-lnmp -p 9092:80 081b2232c327 /bin/bashĦ. Create a new image from a container’s changes ➜ ~ docker commit e50b532a5017 ubuntu-lnmp Stop container ➜ ~ docker stop e50b532a5017ģ. Now let’s perform port mapping on existing containers and mac hosts.Ģ. The container named u-lnmp did not perform port mapping with the mac host when it was created. So How to do port mapping for existing containers? OK, here we have done the port mapping for the Mac host and the new container. Finally, open the safer browser on the MAC host and enter: Install nginx on the docker container and start service. ➜ ~ docker run -i -t -h nginx -name webserver -p 9091:80 ccc6e87d482b /bin/bashģ. Run a new docker container and map the port.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |