Difference between revisions of "Docker run -p"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user 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 13: Line 16:
 
* <code>[[--network]]</code>
 
* <code>[[--network]]</code>
 
* [[ECS]]: <code>[[containerDefinitions]]</code>
 
* [[ECS]]: <code>[[containerDefinitions]]</code>
 +
* [[docker run -d]]
  
 
== See also ==
 
== See also ==

Latest revision as of 09:41, 21 March 2024

docker run -p     It will overwrite value defined by EXPOSE in Dockerfile
 -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: