-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.19-21
57 lines (48 loc) · 1.86 KB
/
Dockerfile.19-21
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
57
FROM oraclelinux:7-slim-21c
# Database defaults
ARG ORACLE_VERSION=19.13.1
ARG ORACLE_INV=/u01/app/oraInventory
ARG ORACLE_BASE=/u01/app/oracle
ARG ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1
ARG ORADATA=/opt/oracle/oradata
ARG ORACLE_EDITION=EE
ARG ORACLE_SID=LAB
ARG ORACLE_21C_HOME=$ORACLE_BASE/product/21c/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_21C_HOME=$ORACLE_21C_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
USER oracle
COPY ./manageOracle.sh /opt/scripts/
COPY --chown=oracle:oinstall --from=oraclesean/db:19.13.1-EE $ORACLE_INV $ORACLE_INV
COPY --chown=oracle:oinstall --from=oraclesean/db:19.13.1-EE $ORACLE_BASE $ORACLE_BASE
COPY --chown=oracle:oinstall --from=oraclesean/db:19.13.1-EE $ORADATA $ORADATA
COPY --chown=oracle:oinstall --from=oraclesean/db:21.5-EE $ORACLE_BASE $ORACLE_BASE
COPY ./bashrc21 /home/oracle/.bashrc
COPY ./config/login.sql.tmpl /home/oracle/login.sql
USER root
RUN chmod 755 /opt/scripts/manageOracle.sh
RUN $DEBUG $SCRIPTS_DIR/$MANAGE_ORACLE -R
USER root
RUN chmod 755 /opt/scripts/manageOracle.sh && \
$DEBUG $SCRIPTS_DIR/$MANAGE_ORACLE -R && \
$ORACLE_21C_HOME/root.sh
USER oracle
RUN $ORACLE_21C_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