Re:Ask HN: How to handle content of a flat-file CMS in Docke...
by ecesena on Wednesday January 23, 2019 @11:46PM
(#18986056)
Keep the container immutable.
So more likely solution 2, the important thing is that you regenerate the container image every time you deploy changes. If you care about faster builds, keep the cmd to pull content towards the end of your Dockerfile.
Immutable containers can be relaunched even when your data is not available, and new images can’t be built. It’s rare, for sure, but even s3 goes down.
Edit: of course for development it’s easier to mount a volume.
So more likely solution 2, the important thing is that you regenerate the container image every time you deploy changes. If you care about faster builds, keep the cmd to pull content towards the end of your Dockerfile.
Immutable containers can be relaunched even when your data is not available, and new images can’t be built. It’s rare, for sure, but even s3 goes down.
Edit: of course for development it’s easier to mount a volume.