I’m having a bit of difficulty understanding how to set up a workflow for using Cockpit with Docker. I’m not very experienced with web development, but I’ve spent the entire day following tutorials and while it’s starting to make sense, I’m unable to connect everything in my head.
I feel like what I want to do is pretty common:
- Set up some Collections and Singletons in Cockpit.
- Write a couple of hooks or include addons to customize how Cockpit behaves.
- (BONUS but not necessary) Populate some sample data for the Collections and Singletons.
- Save all that into something I can deploy on a different server.
I’m trying to use Docker as it seems like that’s what that tool is for. Some questions:
- If I use the image from Docker Hub, can I modify this to add addons? If so, how does this work? If not, is the idea to just make a git fork of the main project and add whatever addons I want in there and make a Docker image from my fork?
- For persistent data, do I want to map the entire cockpit root dir to a Docker volume or just the
storagesubfolder? What’s the best practice here?
- If I make my own fork, would it make sense to just push the SQLite files to git or should the data be separate?
I’m pretty confused into how this all fits together and would appreciate any suggestions, links, examples, etc. to help wrap my head around this.
Thanks in advance!