ttimasdf / docker-cve-search

Dockerized cve-search as a web app
MIT License
16 stars 15 forks source link

Mongo data is in a volume and is lost #1

Closed electricworry closed 12 months ago

electricworry commented 6 years ago

I believe there is an issue with this Dockerfile in that the CVE database that is built during image creation is discarded when complete. This is due to the fact that the mongo image being used stores data in a VOLUME by default. (I think the intention of the mongo image is that the data will be introduced in a container, not during image creation.)

This can be resolved by changing the dependency from 'mongo' to 'mongo-novol', which someone has created for instances such as this.

Cheers.

ttimasdf commented 6 years ago

Wow, indeed. I pulled down with nothing in image. But how did it wiped the data in the container, I wonder