How to Manage Config Files and Storage with Docker and Portainer?

0
3
Asked By CuriousCoder99 On

Hey everyone! I'm new to Docker and have been experimenting with Docker and Docker Compose. Now that I have Docker and Portainer set up on my Ubuntu VPS, I'm trying to figure out how to manage my config files. Currently, Portainer uses a folder called "portainer_data" for its storage, which is a bit out of reach in the root directory, and I'm concerned about how to handle all the config.yaml files I need for my containers. What's the best approach for managing these files and Keeping my container data organized? Do most people create directories under their user folder for this? Also, I've seen different install methods for Portainer, with some guides using Docker Compose and others using simple container deployments. Is there a preferred way to set this up for someone like me, running a personal lab? Appreciate any advice!

1 Answer

Answered By TechSavvyLion On

The "portainer_data" volume is primarily for Portainer's own data, so you still need to manage your container data separately. Each service you run should have its own volume to store persistent data. It's totally fine to stick with the default setups for simplicity, especially when starting out. As for organizing, many users prefer creating a structure under their home directory, like "/home/docker/", which keeps things tidy and accessible. And yes, there's no one-size-fits-all method; it comes down to what feels right for your setup! For managing config files, use volumes along with Docker Compose to define them in your YAML files. This should make it a lot easier!

DockerNewbie42 -

Thanks for the advice! Is there a specific guide you'd recommend for understanding Docker's volume management better?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.