Answer the question
In order to leave comments, you need to log in
How to bypass duplicate tables when running an application in a container?
Hello!
Faced a problem.
Used db backend, under nextcloud. The APP is spinning on a custom image.
The official image is out. I want to migrate to it. I created a new database, reloaded the storage, launched the official container and it works.
But the task is to connect the official container to an existing database that was running on a custom container.
If I try to connect to the current one, then the docker at startup (APP) recreates the tables. And it turns out an error that they are duplicated.
How is it possible to connect to an existing database? New to Docker.
I would be grateful for any advice on what to google, what files to study. Thanks in advance.
Mistake:
Answer the question
In order to leave comments, you need to log in
From the described, I can offer two options:
1. Create a new database based on the off container, run the storage on it. Then take a dump from the database from the user container and deploy it in a new one.
2. If the container writes data to the volume, then simply remount the volume into a new container without starting the storage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question