I installed a docker image from the registry by doing.
docker pull paintedfox/nginx-php5
Now I wish to make some changes to this nginx's config files to add some domains. I believe the config files are somehow help inside the dockers image, but where is the image? How can I change these config files?
If you want to run docker image which pulled from the remote repository just use the IMAGE ID instead of Image name (Repository).
The storage location of Docker images and containersUbuntu: /var/lib/docker/ Fedora: /var/lib/docker/ Debian: /var/lib/docker/ Windows: C:\ProgramData\DockerDesktop.
Docker images can now be edited simply and reliably. This is an example of a Dockerfile for a Zabbix monitoring container. To change the image used by an existing container, we must first delete it, then edit the Docker file to make the necessary changes, and then recreate the container using the new file.
You can run a shell in the image, with:
docker run -t -i --entrypoint bash paintedfox/nginx-php5
Then change the configuration files as you like. Note the container ID (it appears in the prompt, e.g. root@9ffa2bafe2bb:/#
), then commit it to a new image:
docker commit 9ffa2bafe2bb my-new-nginx
You can then run the new image (my-new-nginx
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With