大家讲道理2017-04-25 09:03:19
Enter the containerdocker exec -it containerId/Names /bin/bash
,再使用export
修改就可以了吧 export ENV='value'
我想大声告诉你2017-04-25 09:03:19
Hello, it is not recommended to change the configuration of a running container. The container itself is stateless. Of course, it can also be changed by entering the inside of the container:
docker exec -it <容器id> </bin/bash|/bin/sh>
Such changes cannot be saved persistently. When the container is restarted, the changes will be lost. The correct approach is to put the data that needs to be persisted in the mounted storage volume, and directly delete and rebuild when the configuration needs to be changed.
PS: Portal /q/10...
ringa_lee2017-04-25 09:03:19
Thanks for the invitation, there is a very cool thing called docker-gen. You can try to see if it can solve your problem!