Docker edit configuration settings
Quote from moshe on 28/02/2022, 8:22 pmProblem
User wants to change docker settings when first configured with docker run
Solution
Find the docker id configuration file
first find the container ID
docker ps -a
it will print partial container id ( first 12 characters of the container id )
docker inspect <CONTAINER ID>
check the first line of the output starting with Id
docker stop <CONTAINER ID>
edit the configuration fie
vi /var/lib/docker/containers/<FULL CONTAINER ID>/config.v2.json
change the settings you want to add to the container
sudo service docker restart
docker start <CONTAINER ID>
Problem
User wants to change docker settings when first configured with docker run
Solution
Find the docker id configuration file
first find the container ID
docker ps -a
it will print partial container id ( first 12 characters of the container id )
docker inspect <CONTAINER ID>
check the first line of the output starting with Id
docker stop <CONTAINER ID>
edit the configuration fie
vi /var/lib/docker/containers/<FULL CONTAINER ID>/config.v2.json
change the settings you want to add to the container
sudo service docker restart
docker start <CONTAINER ID>