Difference between revisions of "Docker run -p"
Jump to navigation
Jump to search
(4 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
-p [[--publish]] | -p [[--publish]] | ||
-P --publish-all Publish all exposed ports to random ports | -P --publish-all Publish all exposed ports to random ports | ||
+ | |||
+ | |||
+ | docker run -p 9092:9092 [[apache]]/[[kafka]]:3.7.0 | ||
== Related == | == Related == | ||
Line 12: | Line 15: | ||
* <code>[[docker start]]</code> | * <code>[[docker start]]</code> | ||
* <code>[[--network]]</code> | * <code>[[--network]]</code> | ||
+ | * [[ECS]]: <code>[[containerDefinitions]]</code> | ||
+ | * [[docker run -d]] | ||
== See also == | == See also == | ||
* {{docker run}} | * {{docker run}} | ||
+ | * {{Docker networking}} | ||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 09:41, 21 March 2024
docker run -p It will overwrite value defined byEXPOSE
inDockerfile
-p, --publish list Publish a container's port(s) to the host
-p --publish -P --publish-all Publish all exposed ports to random ports
docker run -p 9092:9092 apache/kafka:3.7.0
Related[edit]
See also[edit]
Advertising: