Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve dockerfile some #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
FROM oracle/serverjre:8

ENV FMW_PKG=fmw_12.2.1.3.0_infrastructure_Disk1_1of1.zip \
FMW_JAR=fmw_12.2.1.3.0_infrastructure.jar

COPY $FMW_PKG /

RUN $JAVA_HOME/bin/jar xf /$FMW_PKG

#Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
Expand All @@ -24,7 +33,6 @@ FROM oracle/serverjre:8
# ----------
MAINTAINER Monica Riccelli <[email protected]>


# Common environment variables required for this build
# ----------------------------------------------------
ENV ORACLE_HOME=/u01/oracle \
Expand All @@ -35,16 +43,15 @@ ENV ORACLE_HOME=/u01/oracle \
VOLUME_DIR=/u01/oracle/user_projects \
PATH=$PATH:/usr/java/default/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/container-scripts


#USER root
# Setup subdirectory for FMW install package and container-scripts
# -----------------------------------------------------------------
RUN mkdir -p /u01 && \
chmod a+xr /u01 && \
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \
chown oracle:oracle /u01 && \
mkdir -p /u01/oracle/container-scripts


# Copy packages and scripts
# -------------
COPY container-scripts/* /u01/oracle/container-scripts/
Expand All @@ -56,23 +63,21 @@ ENV FMW_PKG=fmw_12.2.1.3.0_infrastructure_Disk1_1of1.zip \

# Copy packages
# -------------
COPY $FMW_PKG install.file oraInst.loc /u01/
RUN chown oracle:oracle -R /u01 && \
chmod +xr $SCRIPT_FILE && \
COPY --from=0 --chown=oracle:oracle /$FMW_JAR /u01/
COPY --chown=oracle:oracle install.file oraInst.loc /u01/
RUN chmod +xr $SCRIPT_FILE && \
yum install -y libaio && \
rm -rf /var/cache/yum && \
mkdir -p $VOLUME_DIR && \
chown -R oracle:oracle $VOLUME_DIR

VOLUME $VOLUME_DIR


# Install
# ------------------------------------------------------------
USER oracle
RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$FMW_PKG && cd - && \
$JAVA_HOME/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebLogic Server" && \
rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/oraInst.loc /u01/install.file
RUN $JAVA_HOME/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebLogic Server" && \
rm /u01/$FMW_JAR /u01/oraInst.loc /u01/install.file

WORKDIR ${ORACLE_HOME}

Expand Down