I'm experiencing some weird behavior on the google compute engine. I made a new instance with ubuntu on it. I installed a node app I'm working on, pulled code from github etc...
then I installed mongodb and nginx. The weird thing is, every time I leave the session, and reconnect, my mongodb and nginx installation files disappear.
for example, when I install nginx I find the nginx installation on /etc/nginx
where I can find like nginx.conf
. but when I left the compute engine console session, and reconnected later, that directory was gone. same thing is happening with mongodb.
my node installation under /home/abdul/mystuff
doesn't disappear though.
is this normal? is it a setting?
details:
sudo apt-get update sudo apt-get install nginx
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 10G 0 disk └─sda1 8:1 0 10G 0 part /var/lib/docker/aufs sdb 8:16 0 5G 0 disk └─sdb1 8:17 0 5G 0 part /home
Looks like you're running a Docker container on your instance (/var/lib/docker/aufs) and installing the software inside the container.
If you want to save changes back to the image, it is possible to use the docker commit command, but this is almost definitely not what you want.
Instead, use a Dockerfile to build images and update it whenever you want to make a change. This way you can easily recreate the image and make changes without starting from scratch. For persistence (.eg config files and databases) use volumes, which are just directories stored outside of the Union File System as normal directories on the host.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.