Skip to content

Commit 04be747

Browse files
authored
Remove "su" command and move common commands to the head of the file
Remove "su" command and move common commands to the head of the file. Change AS port for consistency
1 parent 148cf98 commit 04be747

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

OracleWebLogic/dockerfiles/12.2.1.1/Dockerfile.developer

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,45 @@ FROM oracle/serverjre:8
3333
# ----------
3434
MAINTAINER Monica Riccelli <[email protected]>
3535

36-
# Environment variables required for this build (do NOT change)
37-
# -------------------------------------------------------------
38-
ENV FMW_PKG=fmw_12.2.1.1.0_wls_quick_Disk1_1of1.zip \
39-
FMW_JAR=fmw_12.2.1.1.0_wls_quick.jar \
40-
SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \
36+
# Common environment variables required for this build (do NOT change)
37+
# --------------------------------------------------------------------
38+
ENV SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \
4139
ORACLE_HOME=/u01/oracle \
4240
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
4341
DEBUG_FLAG=true \
4442
PRODUCTION_MODE=dev \
4543
DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \
4644
DOMAIN_HOME=/u01/oracle/user_projects/domains/${DOMAIN_NAME:-base_domain} \
47-
ADMIN_PORT="${ADMIN_PORT:-8001}" \
45+
ADMIN_PORT="${ADMIN_PORT:-7001}" \
4846
PATH=$PATH:/usr/java/default/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
49-
50-
# Copy packages
51-
# -------------
52-
COPY $FMW_PKG install.file oraInst.loc /u01/
47+
48+
# Copy scripts
49+
#-------------
5350
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/
5451

5552
# Setup filesystem and oracle user
56-
# Install and configure Oracle JDK
5753
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
58-
# ------------------------------------------------------------
54+
# ------------------------------------------------------------
5955
RUN chmod a+xr /u01 && \
6056
chmod +xr $SCRIPT_FILE && \
6157
useradd -b /u01 -M -s /bin/bash oracle && \
6258
chown oracle:oracle -R /u01 && \
63-
echo oracle:oracle | chpasswd && \
64-
yum -y install util-linux && yum clean all && \
65-
cd /u01 && $JAVA_HOME/bin/jar xf /u01/$FMW_PKG && cd - && \
66-
su -c "$JAVA_HOME/bin/java -jar /u01/$FMW_JAR -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME" - oracle && \
59+
echo oracle:oracle | chpasswd
60+
61+
# Environment variables required for this build (do NOT change)
62+
# -------------------------------------------------------------
63+
ENV FMW_PKG=fmw_12.2.1.1.0_wls_quick_Disk1_1of1.zip \
64+
FMW_JAR=fmw_12.2.1.1.0_wls_quick.jar
65+
66+
# Copy packages
67+
# -------------
68+
COPY $FMW_PKG install.file oraInst.loc /u01/
69+
70+
# Install
71+
# ------------------------------------------------------------
72+
USER oracle
73+
RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$FMW_PKG && cd - && \
74+
$JAVA_HOME/bin/java -jar /u01/$FMW_JAR -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME && \
6775
rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/oraInst.loc /u01/install.file
6876

6977
WORKDIR ${ORACLE_HOME}

0 commit comments

Comments
 (0)