E
E
Egor Irvin2022-02-07 11:58:24
PostgreSQL
Egor Irvin, 2022-02-07 11:58:24

How to wrap existing postgresql db in docker container?

Good afternoon.
I have an app.jar application which, when installed, creates a user and password in posgtresql. At this point postgresql should just be installed and running.
I managed to push and run the application in a container, but it needs postgres.
How can you push the existing database into a container and explain to the application where to look?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2022-02-07
@sergey-gornostaev

You can't stuff bases into containers. And the DBMS is not desirable .

A
Alexander Karabanov, 2022-02-07
@karabanov

Raise the container with the base, fill it with a dump, in the application settings, specify where to connect.
Within docker-compose, this is convenient to do.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question