oracle/docker-images

Permission denied in /opt/oracle/product/ folder

Open

#1962 aperta il 9 giu 2021

Vedi su GitHub
 (2 commenti) (1 reazione) (0 assegnatari)Shell (5379 fork)batch import
help wantedquestion

Metriche repository

Star
 (6139 star)
Metriche merge PR
 (Merge medio 6g 10h) (2 PR mergiate in 30 g)

Descrizione

Hello everyone,

I am having trouble to run an oracle 19.3 Standard Edition 2 in OpenShift.

I built the image with:

./buildContainerImage.sh -v 19.3.0 -t oracle-db-standard:19.3.0 -s

On my local machine (MacOS and Windows) with the Docker Desktop the container works as expected with the following command:

docker run --name oracle-db -p 1521:1521 -p 5500:5500 -v /some-path/db/oradata:/opt/oracle/oradata -e ORACLE_PWD=<pw> oracle-db-standard:19.3.0

However, I'm getting an error when I run the Image in an OpenShift environment with the following deployment config:

...
    containers:
        - env:
            - name: ORACLE_PWD
              value: <some-pw>
          image: >-
            docker-registry.default.svc:5000/some-env/oracle-db-standard@sha256:ab3ab8ecb1a5cf609a21d23528b97085c57b72deeec6e49e7141df7c69dfd216
          imagePullPolicy: Always
          name: oracle
          ports:
            - containerPort: 1521
              protocol: TCP
            - containerPort: 5500
              protocol: TCP
          resources:
            limits:
              cpu: 1
              memory: 2Gi
            requests:
              cpu: 30m
              memory: 1Gi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /opt/oracle/oradata
              name: volume-1y2b9
...

Following error is displayed:

ORACLE EDITION: STANDARD
touch: cannot touch '/opt/oracle/product/19c/dbhome_1/install/.docker_standard': Permission denied
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: <PASSWORD>
opt/oracle/createDB.sh: line 58: /opt/oracle/product/19c/dbhome_1/network/admin/sqlnet.ora: Permission denied

Guida contributor