Difference between revisions of "Docker run -p"

From wikieduonline
Jump to navigation Jump to search
 
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 ==

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: