我已经下载了一个postgresql docker镜像,目前正在编辑一些配置文件。我遇到的问题是,每当我编辑配置文件并提交docker镜像(将其保存为新镜像)时,它永远不会保存任何内容。镜像仍然与我下载的镜像相同。
我正在使用的图像:https://hub.docker.com/_/postgres/
这是我所做的:
1. Run the postgresql docker container
2. Enter the terminal of the container. docker exec -i -t {id of container} /bin/bash
3. Edit some config files.
4. Exit the container.
5. Commit the changes by using docker commit {containerid} {new name}
6. Stop the old container and start the new one.将创建新的容器。如果我用新的镜像启动新的容器并检查我编辑的配置文件,我的更改就不存在了。未提交任何更改。
我在这里做错了什么?
https://stackoverflow.com/questions/41429136
复制相似问题