[Docker Redis] Docker Frequently Asked Questions (FAQs)
Docker FAQs
Modify container by config file
Each Docker container has a set of config files associated with it. The parameters of that container, such as Image, Port mapping, would be specified in that file.
The config file is a json file at the location /var/lib/docker/containers/<Container ID>/config.v2.json.
1 | Get container id. |
After stopping the container, the config.v2.json file can be edited to update the corresponding entry for Ports and NetworkSettings. The PortBindings entry in hostconfig.json file is also updated.
After making the changes in config files, Docker service is restarted and container is started.
See Docker - change container configuration in 4 ways - https://bobcares.com/blog/docker-change-container-configuration/ to learn more.
References
[1] Empowering App Development for Developers | Docker - https://www.docker.com/