🔧 AI Nachrichten KI-Angriffe: Geheimdienste sollen neue Befugnisse erhalten(11.09.2026 um 11:00 Uhr)
🔧 AI Nachrichten Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf(28.08.2026 um 08:46 Uhr)
🐧 Linux TippsPACMAN: KI-Framework steuert Fusionsplasma in Echtzeit(11.09.2026 um 10:46 Uhr)
📰 IT NachrichtenAutismus und ADHS mit früher Weichmacher-Exposition verknüpft(12.09.2026 um 09:04 Uhr)
🪟 Windows TippsMicrosoft bringt Emoji 17.0 auf Windows 11(31.08.2026 um 08:16 Uhr)
⚠️ Malware / Trojaner / VirenNeue Android-Malware schreit Sie an, wenn Sie nicht zahlen(11.09.2026 um 10:33 Uhr)
📰 IT Nachrichten7-max: Tool bringt 10 bis 20 Prozent mehr Tempo für Programme(12.09.2026 um 09:30 Uhr)
⚠️ Malware / Trojaner / VirenHandy: Wer diese App installiert hat, sollte sein Gerät besser zurücksetzen(11.09.2026 um 16:55 Uhr)
🔧 AI Nachrichten KI-Angriffe: Geheimdienste sollen neue Befugnisse erhalten(11.09.2026 um 11:00 Uhr)
🔧 AI Nachrichten Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf(28.08.2026 um 08:46 Uhr)
🐧 Linux TippsPACMAN: KI-Framework steuert Fusionsplasma in Echtzeit(11.09.2026 um 10:46 Uhr)
📰 IT NachrichtenAutismus und ADHS mit früher Weichmacher-Exposition verknüpft(12.09.2026 um 09:04 Uhr)
🪟 Windows TippsMicrosoft bringt Emoji 17.0 auf Windows 11(31.08.2026 um 08:16 Uhr)
⚠️ Malware / Trojaner / VirenNeue Android-Malware schreit Sie an, wenn Sie nicht zahlen(11.09.2026 um 10:33 Uhr)
📰 IT Nachrichten7-max: Tool bringt 10 bis 20 Prozent mehr Tempo für Programme(12.09.2026 um 09:30 Uhr)
⚠️ Malware / Trojaner / VirenHandy: Wer diese App installiert hat, sollte sein Gerät besser zurücksetzen(11.09.2026 um 16:55 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 2 Min Lesezeit
0

Docker Port Mapping

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Docker port mapping allows your containerized application to be accessed from outside the container by linking a port on the host machine to a port inside the container.






Why Port Mapping?



Containers run in isolated environments, so they don’t automatically have access to your host’s network. Port mapping lets you “expose” specific ports from the container so external requests can reach it.



For example, if you’re running a web app in a container on port 80, you can use port mapping to make it available on a specified port on your computer, like port 8080.






How to Use Docker Port Mapping



When running a container, you can map ports with the -p option in the following format:



docker run -p :






Example



Let's say you have a web server running on port 80 inside a Docker container, and you want to access it on port 8080 on your local machine.



docker run -p 8080:80 my_web_server




  • 8080: Port on the host machine (your computer).


  • 80: Port inside the container where the application is running.


  • my_web_server: Name of the Docker image.




Now, if you open http://localhost:8080 in a web browser, you’ll be able to access the application running in the Docker container.






Multiple Port Mappings



You can also map multiple ports if needed. Here’s an example where we map ports 8080 and 443 (for HTTPS):



docker run -p 8080:80 -p 8443:443 my_web_server




  • 8080:80 maps port 80 in the container to 8080 on the host.


  • 8443:443 maps port 443 in the container to 8443 on the host.







Check Mapped Ports



To check the mapped ports of running containers, use:



docker ps



This command shows the container’s details, including the port mappings under the “PORTS” column.






Common Use Cases




  1. Web Applications: Expose port 80 or 443 from the container to make the app accessible via HTTP or HTTPS.


  2. Database Containers: Map standard ports like 3306 (MySQL) or 5432 (PostgreSQL) for database access.


  3. API Services: Expose specific ports so other services can access the API.







Summary




  • Use -p : to map a container port to a host port.


  • You can map multiple ports by specifying -p multiple times.


  • Check your mappings with docker ps.




Port mapping in Docker allows applications inside containers to communicate with the outside world, enabling easy access and integration into your development or production environment.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
KI-Angriffe: Geheimdienste sollen neue Befugnisse erhalten
1 Quelle
Podcast: ChatGPT schwatzt Nutzern in Deutschland jetzt Werbung auf
1 Quelle
PACMAN: KI-Framework steuert Fusionsplasma in Echtzeit
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Docker Port Mapping

Thematisch verwandte Begriffe: Docker, Port, Mapping · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...