- Learn OpenShift
- Denis Zuev Artemii Kropachev Aleksey Usov
- 83字
- 2021-08-13 16:03:47
Docker port mapping
In order to actually benefit from the container, we need to make it publicly accessible from the outside. This is where we will need to use the -p option with a few arguments while running the docker run command:
$ docker run -d -p 8080:80 httpd
3b1150b5034329cd9e70f90ee21531b8b1ab1d4a85141fd3a362cd40db80e193
Option -p maps container port 80 to your server port 8080. Verify that you have a httpd container exposed and a web server running:
$ curl localhost:8080
<html><body><h1>It works!</h1></body></html>
推薦閱讀
- Linux設備驅動開發詳解(第2版)
- Linux網絡管理與配置(第2版)
- Modern Web Testing with TestCafe
- Linux操作系統基礎
- Mastering Distributed Tracing
- SOA實踐者說
- vSphere Virtual Machine Management
- 精解Windows 8
- 嵌入式Linux系統開發:基于Yocto Project
- Linux Shell編程從入門到精通(第2版)
- 數據中心系統工程及應用
- 竹林蹊徑:深入淺出windows驅動開發
- Windows 7中文版從入門到精通(修訂版)
- Joomla! 3 Template Essentials
- Linux內核設計的藝術:圖解Linux操作系統架構設計與實現原理