Docker changer le port mapping à un container existant

1) arrêter le container (docker stop [hash_of_the_container])
2) modifier les fichiers /var/lib/docker/containers/[hash_of_the_container]/hostconfig.json et /var/lib/docker/containers/[hash_of_the_container]/config.v2.json
3) redémarrer le service docker ( sudo service docker restart) pour vider les caches
4) démarrer le container (docker stqrt [hash_of_the_container])

Cet article a été publié dans docker, Virtualisation. Ajoutez ce permalien à vos favoris.