summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html
new repository
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html')
-rw-r--r--devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html
new file mode 100644
index 00000000..122a0db5
--- /dev/null
+++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fport%2Findex.html
@@ -0,0 +1,28 @@
+<h1>docker port</h1> <p><br></p> <p>List port mappings or a specific mapping for the container</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker port CONTAINER [PRIVATE_PORT[/PROTO]]
+</pre></div> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="examples">Examples</h2> <h3 id="show-all-mapped-ports">Show all mapped ports</h3> <p>You can find out all the ports mapped by not specifying a <code class="language-plaintext highlighter-rouge">PRIVATE_PORT</code>, or just a specific mapping:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker ps
+
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+b650456536c7 busybox:latest top 54 minutes ago Up 54 minutes 0.0.0.0:1234-&gt;9876/tcp, 0.0.0.0:4321-&gt;7890/tcp test
+
+$ docker port test
+
+7890/tcp -&gt; 0.0.0.0:4321
+9876/tcp -&gt; 0.0.0.0:1234
+
+$ docker port test 7890/tcp
+
+0.0.0.0:4321
+
+$ docker port test 7890/udp
+
+2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
+
+$ docker port test 7890
+
+0.0.0.0:4321
+</pre></div> <div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
+ <a href="https://docs.docker.com/engine/reference/commandline/port/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/port/</a>
+ </p>
+</div>