S
S
Shurik2020-05-07 22:20:44
Oracle
Shurik, 2020-05-07 22:20:44

Why is the data not saved in the db container?

Good evening.
The name of the container is oracle db. A few days ago I made a sign in it and added data. Today I start the container again, and it's empty there. How to make sure that the data is saved?
docker-compose.yml file:

version: "3.4"
services:
  oracle11:
    image: jeugenio/oracle-xe-11g
    container_name: oracle11
    tty: true
    volumes:
      - ./sql:/docker-entrypoint-initdb.d
    environment:
      - ORACLE_ALLOW_REMOTE=true
    ports:
      - "49160:22"
      - "1521:1521"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2020-05-07
@IgorPI

No need to store data in a container.
You risk losing data.
Any reconfiguration will result in data loss.
Better don't do it.
In your case, most likely there was a reconfiguration of the "docker engine"
There is an interesting topic

D
Dim Boy, 2020-05-07
@twix007

you also need to forward the folder with the db files

volumes:
      - ./sql:/docker-entrypoint-initdb.d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question