OpenShift: ORDS does not run: permission
rbaumgar opened this issue · 1 comments
rbaumgar commented
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:
- why is the Dockerfile using a jdk:latest (22) and then install java 11? strange!
- why can't I use the default ORDS container?
Documentation https://github.com/oracle/oracle-database-operator/blob/main/docs/multitenant/README.md#oracle-rest-data-service-ords-image
Update #82 required.