Skip to content

Permission denied in /opt/oracle/product/ folder #1962

Open
@sflepp

Description

@sflepp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions