How to expose container's ports?
Options Used for port expose:
--publish, -p Publish a container’s port(s) to the host--publish-all, -P Publish all exposed ports to random ports
Commands:
[root@localhost ~]# docker run --name 'nginx2' -P -itd nginx[root@localhost ~]# docker run --name 'nginx3' -p 1521:80 -itd nginx
No comments:
Post a Comment