forked from fuzziebrain/docker-oracle-xe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (31 loc) · 1.11 KB
/
Dockerfile
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
FROM oraclelinux:7-slim
LABEL MAINTAINER="Adrian Png <[email protected]>"
ENV \
# The only environment variable that should be changed!
ORACLE_PASSWORD=Oracle18 \
EM_GLOBAL_ACCESS_YN=Y \
# DO NOT CHANGE
ORACLE_DOCKER_INSTALL=true \
ORACLE_SID=XE \
ORACLE_BASE=/opt/oracle \
ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE \
ORAENV_ASK=NO \
RUN_FILE=runOracle.sh \
SHUTDOWN_FILE=shutdownDb.sh \
EM_REMOTE_ACCESS=enableEmRemoteAccess.sh \
EM_RESTORE=reconfigureEm.sh \
ORACLE_XE_RPM=oracle-database-xe-18c-1.0-1.x86_64.rpm \
CHECK_DB_FILE=checkDBStatus.sh
COPY ./files/${ORACLE_XE_RPM} /tmp/
RUN yum install -y oracle-database-preinstall-18c && \
yum install -y /tmp/${ORACLE_XE_RPM} && \
rm -rf /tmp/${ORACLE_XE_RPM}
COPY ./scripts/*.sh ${ORACLE_BASE}/scripts/
RUN chmod a+x ${ORACLE_BASE}/scripts/*.sh
# 1521: Oracle listener
# 5500: Oracle Enterprise Manager (EM) Express listener.
EXPOSE 1521 5500
VOLUME [ "${ORACLE_BASE}/oradata" ]
HEALTHCHECK --interval=1m --start-period=2m --retries=10 \
CMD "$ORACLE_BASE/scripts/$CHECK_DB_FILE"
CMD exec ${ORACLE_BASE}/scripts/${RUN_FILE}