oracle / oracle-database-operator

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Universal Permissive License v1.0
141 stars 45 forks source link

OpenShift: ORDS does not run: permission #124

Closed rbaumgar closed 1 month ago

rbaumgar commented 3 months ago

once more the build file for ORDS is not correct when you want to run the container on OpenShift.

permission issue.

This is a working Dockerfile, original https://github.com/oracle/oracle-database-operator/blob/main/ords/Dockerfile

FROM  container-registry.oracle.com/java/jdk:latest

# Environment variables required for this build (do NOT change)
# -------------------------------------------------------------
ENV ORDS_HOME=/opt/oracle/ords \
    RUN_FILE="runOrdsSSL.sh" 

#RUN_FILE_NOSSL="runOrdsNOSSL.sh"

RUN yum -y install yum-utils bind-utils tree hostname openssl net-tools zip unzip tar wget vim-minimal which sudo expect procps && \
    yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL8/oracle/software/x86_64 && \
    yum -y install java-11-openjdk-devel && \
    yum -y install ords && \
    yum -y install iproute && \
    yum clean all 

# Copy binaries
# -------------
COPY   $RUN_FILE $ORDS_HOME 
#COPY   $RUN_FILE_NOSSL $ORDS_HOME

# Setup filesystem and oracle user
# ------------------------------------------------------------
RUN mkdir -p  $ORDS_HOME/doc_root                                  && \
    mkdir -p  $ORDS_HOME/error                                     && \
    mkdir -p  $ORDS_HOME/secrets                                   && \
    mkdir -p  $ORDS_HOME/config/ords                               && \
    chown -R  1001:0 $ORDS_HOME /etc/ords.conf /etc/ords/config  && \
    chmod -R  g=u $ORDS_HOME /etc/ords.conf           && \
    chmod +x  $ORDS_HOME/*.sh

# Finalize setup
# -------------------
USER 1001
WORKDIR $ORDS_HOME

VOLUME ["$ORDS_HOME/config/ords"]
EXPOSE 8888

# Define default command to start Ords Services
CMD $ORDS_HOME/$RUN_FILE

## ONLY FOR DEVELOPMENT STAGE
#CMD ["/usr/sbin/init"]

Questions:

Documentation https://github.com/oracle/oracle-database-operator/blob/main/docs/multitenant/README.md#oracle-rest-data-service-ords-image

Update https://github.com/oracle/oracle-database-operator/issues/82 required.

mmalvezz commented 1 month ago

Issue #82 has been closed