-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.11-19
56 lines (47 loc) · 1.86 KB
/
Dockerfile.11-19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM oraclelinux:7-slim-19c
# Database defaults
ARG ORACLE_VERSION=11.2.0.4
ARG ORACLE_INV=/u01/app/oraInventory
ARG ORACLE_BASE=/u01/app/oracle
ARG ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1
ARG ORADATA=/opt/oracle/oradata
ARG ORACLE_EDITION=EE
ARG ORACLE_SID=LAB
ARG ORACLE_19C_HOME=$ORACLE_BASE/product/19c/dbhome_1
# Pass --build-arg DEBUG="bash -x" to run scripts in debug mode.
ARG DEBUG=
# Environment settings
ENV ORACLE_BASE=$ORACLE_BASE \
ORACLE_HOME=$ORACLE_HOME \
ORACLE_19C_HOME=$ORACLE_19C_HOME \
ORACLE_INV=$ORACLE_INV \
ORADATA=$ORADATA \
ORACLE_VERSION=$ORACLE_VERSION \
ORACLE_EDITION=$ORACLE_EDITION \
ORACLE_SID=$ORACLE_SID \
DEBUG=$DEBUG \
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch/:/usr/sbin:$PATH \
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib \
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib \
TNS_ADMIN=$ORACLE_HOME/network/admin
#COPY ./manageOracle.sh /opt/scripts/
USER oracle
COPY ./manageOracle.sh /opt/scripts/
COPY --chown=oracle:oinstall --from=oraclesean/db:11.2.0.4-EE $ORACLE_INV $ORACLE_INV
COPY --chown=oracle:oinstall --from=oraclesean/db:11.2.0.4-EE $ORACLE_BASE $ORACLE_BASE
COPY --chown=oracle:oinstall --from=oraclesean/db:11.2.0.4-EE $ORADATA $ORADATA
COPY --chown=oracle:oinstall --from=oraclesean/db:19.13.1-EE $ORACLE_BASE $ORACLE_BASE
COPY ./bashrc19 /home/oracle/.bashrc
COPY ./config/login.sql.tmpl /home/oracle/login.sql
USER root
RUN chmod 755 /opt/scripts/manageOracle.sh && \
yum install -y gcc && yum clean all && \
$DEBUG $SCRIPTS_DIR/$MANAGE_ORACLE -R && \
$ORACLE_19C_HOME/root.sh
USER oracle
RUN $ORACLE_19C_HOME/oui/bin/attachHome.sh
WORKDIR /home/oracle
VOLUME ["$ORADATA"]
EXPOSE 1521 5500 8080
HEALTHCHECK --interval=1m --start-period=5m CMD $SCRIPTS_DIR/$MANAGE_ORACLE -h >/dev/null || exit 1
CMD exec $DEBUG $SCRIPTS_DIR/$MANAGE_ORACLE