MaksymBilenko / docker-oracle-12c

:whale: Docker image with Oracle Database 12c on board
Apache License 2.0
685 stars 288 forks source link

Issue Initializing database on mapped volume #105

Closed gabrielrdrguez closed 6 years ago

gabrielrdrguez commented 6 years ago

$ sudo docker run -d -p 8088:8080 -p 1522:1521 -v /data/oracle:/u01/app/oracle sath89/oracle-12c

Database not initialized. Initializing database. Starting tnslsnr Cannot create directory "/u01/app/oracle/cfgtoollogs/dbca"

It doesn't seem to be related to the issue linked on the readme. I'm running on Ubuntu 16.04, docker 18.03.1-ce, and I also tried running with rancher 1.6 as the host's memory resource limit is 15953 MB It only happens if I map the volume, otherwise works just fine.

prashanthmcr commented 6 years ago

I seem to be having the same issue on Windows 10 docker 18.03.0-ce

lsalomon commented 6 years ago

solved with named volumes

hope this will help !

at the end, this is not an issue related to this repo, the problem is that chmod or chown doesn't work on mounted volumes, but works like a charm using docker builtin named volumes

version: '2'
services:
  oracle:
    image: "oracle-db"
    build:
      context: ".."
      dockerfile: ".docker/oracle.dockerfile"
    env_file:
     - ../.env
    ports:
     - "1521:1521"
     - "8082:8080"
    volumes:
     - oracle-data:/u01/app/oracle
volumes:
    oracle-data:
        driver: local