I'm currently running AdGuard on my Raspberry Pi and syncing its configuration file with a NAS for backups. Now, I want to host AdGuard in a Docker container on my Home Server. Since AdGuard doesn't allow importing backup files via the GUI, my plan is to replace the stock configuration file located at /etc/adguardhome with one from my backup. I'm new to Docker and I'm unsure if this process is feasible. Any suggestions?
2 Answers
You don't actually need to SSH into the container. Instead, you can directly run a bash shell inside it using the command `docker exec -it your_container_name bash`. This way, you won't need to set up an SSH server inside your container. If you want to replace the configuration file, consider using a bind mount to link your configuration folder to the container, rather than manually replacing files after the container is running.
The best approach is to use a bind mount for the configuration directory. You can do this by adding a line like `volumes: - ./adguardhome/config:/opt/adguardhome/conf` in your Docker setup. That way, you can edit the `AdGuardHome.yaml` file directly from the host using a tool like VSCode over SSH, and your changes will persist even after container restarts.

Exactly! This method ensures your configuration files won't be lost after a restart, as they remain stored on the host system.