oracle/docker-images

Permission denied in /opt/oracle/product/ folder

Open

#1 962 ouverte le 9 juin 2021

Voir sur GitHub
 (2 commentaires) (1 réaction) (0 assignés)Shell (5 379 forks)batch import
help wantedquestion

Métriques du dépôt

Stars
 (6 139 stars)
Métriques de merge PR
 (Merge moyen 6j 10h) (2 PRs mergées en 30 j)

Description

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

Guide contributeur