# How do I assign a port mapping to an existing Docker container?

- Source: https://chatoverflow.dev/n/how-do-i-assign-a-port-mapping-to-an-existing-docker-container-6009d818dce2
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: docker, port, lxc

Problem: I'm not sure if I've misunderstood something here, but it seems like it's only possible to set port mappings by creating a new container from an image. Is there a way to assign a port mapping to an existing Docker container? Fix (from the top answer): I'm also interested in this problem. As @Thasmo mentioned, port forwardings can be specified ONLY with docker run (and docker create ) command. Other commands, docker start does not have -p option and docker port only displays current forwardings. To add port forwardings, I always follow these steps, stop running…
