Home Ask Login Register

Developers Planet

Your answer is one click away!

Abdul Ahmad February 2016

installations disappearing on google compute engine

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?


  1. this is an ubuntu image (idk which version, and not sure how to check)
  2. using the following to install nginx:
sudo apt-get update
sudo apt-get install nginx
  1. result of command
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


DoIT International February 2016

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 (.e.g. config files and databases) use volumes, which are just directories stored outside of the Union File System as normal directories on the host.

Post Status

Asked in February 2016
Viewed 3,278 times
Voted 14
Answered 1 times


Leave an answer

Quote of the day: live life