Tagged articles
2 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Mar 19, 2023 · Operations

How to Add or Modify Docker Container Port Mappings After Creation

This guide explains step‑by‑step how to add, change, or remove port mappings for Docker containers by stopping the container, editing hostconfig.json (and optionally config.v2.json), and restarting the container, with commands for both Linux and Docker Desktop for Mac.

Container ConfigurationDevOpsDocker
0 likes · 6 min read
How to Add or Modify Docker Container Port Mappings After Creation
Open Source Linux
Open Source Linux
Nov 15, 2022 · Cloud Native

Easily Add or Modify Docker Container Port Mappings on macOS

Learn step‑by‑step how to expose new ports or modify existing ones for Docker containers on macOS, including using the -p flag during container creation, editing hostconfig.json and config files inside the Docker VM, and restarting Docker to apply changes.

Container ConfigurationDockerHostconfig
0 likes · 6 min read
Easily Add or Modify Docker Container Port Mappings on macOS