R
R
Rick2018-02-01 20:37:31
linux
Rick, 2018-02-01 20:37:31

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:
5a73503758e11326040377.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-02-01
@sah4ez32

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 question

Ask a Question

731 491 924 answers to any question