8000 Added new 19c docker image scripts. · utPLSQL/docker-scripts@2bfd978 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2bfd978

Browse files
committed
Added new 19c docker image scripts.
19.3-small is going to be used for CI
1 parent 7dc9c89 commit 2bfd978

34 files changed

+2374
-5
lines changed

19.3-small/Checksum.ee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1858bd0d281c60f4ddabd87b1c214a4f LINUX.X64_193000_db_home.zip

19.3-small/Checksum.se2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1858bd0d281c60f4ddabd87b1c214a4f LINUX.X64_193000_db_home.zip

19.3-small/Dockerfile

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# REQUIRED FILES TO BUILD THIS IMAGE
2+
# ----------------------------------
3+
# (1) db_home.zip
4+
# Download Oracle Database 19c Standard Edition 2 for Linux x64
5+
# from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
6+
#
7+
# HOW TO BUILD THIS IMAGE
8+
# -----------------------
9+
# Put all downloaded files in the same directory as this Dockerfile
10+
# Run:
11+
# $ docker build -t utplsql/oracledb:19.3.0-se2 .
12+
#
13+
# Pull base image
14+
# ---------------
15+
FROM oraclelinux:7-slim
16+
17+
# Maintainer
18+
# ----------
19+
LABEL maintainer="Pavel Kaplya <pazus@utplsql.org>" \
20+
description="Oracle 19c database. Based on official docker images by Gerald Venzl (Oracle) - \
21+
https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance/dockerfiles"
22+
23+
# Environment variables required for this build (do NOT change)
24+
# -------------------------------------------------------------
25+
ENV ORACLE_BASE=/opt/oracle \
26+
ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 \
27+
PDB_BASE_DIR=/opt/oracle/oradata/pdbs \
28+
INSTALL_FILE_1="LINUX.X64_193000_db_home.zip" \
29+
INSTALL_RSP="db_inst.rsp" \
30+
CONFIG_RSP="dbca.rsp.tmpl" \
31+
DB_TEMPLATE_FILE="MinimalDB.dbt" \
32+
PWD_FILE="setPassword.sh" \
33+
RUN_FILE="runOracle.sh" \
34+
START_FILE="startDB.sh" \
35+
STOP_FILE="stopDB.sh" \
36+
CREATE_DB_FILE="createDB.sh" \
37+
CLEANUP_DB_FILE="cleanupDB.sh" \
38+
PREPARE_DB_FILE="prepareDB.sh" \
39+
CREATE_PDB_FILE="createPDB.sh" \
40+
SETUP_LINUX_FILE="setupLinuxEnv.sh" \
41+
CLEANUP_FILE="cleanup.sh" \
42+
CHECK_SPACE_FILE="checkSpace.sh" \
43+
INSTALL_DB_BINARIES_FILE="installDBBinaries.sh" \
44+
ORACLE_PWD="oracle" \
45+
ORACLE_PDB="ORCLPDB1" \
46+
ORACLE_SID="ORCLCDB" \
47+
CREATE_PDB="false"
48+
49+
# Use second ENV so that variable get substituted
50+
ENV INSTALL_DIR=$ORACLE_BASE/install \
51+
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch/:/usr/sbin:$PATH \
52+
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib \
53+
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
54+
55+
# Copy binaries
56+
# -------------
57+
COPY $INSTALL_FILE_1 $INSTALL_RSP $SETUP_LINUX_FILE $CHECK_SPACE_FILE $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/
58+
COPY $RUN_FILE $START_FILE $STOP_FILE $CREATE_DB_FILE $CREATE_PDB_FILE $CONFIG_RSP $PWD_FILE $CLEANUP_FILE $CLEANUP_DB_FILE $PREPARE_DB_FILE $DB_TEMPLATE_FILE $ORACLE_BASE/
59+
60+
RUN chmod ug+x $INSTALL_DIR/*.sh && \
61+
sync && \
62+
$INSTALL_DIR/$CHECK_SPACE_FILE && \
63+
$INSTALL_DIR/$SETUP_LINUX_FILE
64+
65+
# Install DB software binaries
66+
USER oracle
67+
RUN $INSTALL_DIR/$INSTALL_DB_BINARIES_FILE SE2
68+
69+
USER root
70+
RUN $ORACLE_BASE/oraInventory/orainstRoot.sh && \
71+
$ORACLE_HOME/root.sh && \
72+
rm -rf $INSTALL_DIR
73+
74+
USER oracle
75+
RUN chmod ug+x $ORACLE_BASE/*.sh && \
76+
$ORACLE_BASE/$CREATE_DB_FILE && \
77+
$ORACLE_BASE/$CLEANUP_DB_FILE && \
78+
$ORACLE_BASE/$STOP_FILE && \
79+
$ORACLE_BASE/$CLEANUP_FILE
80+
81+
WORKDIR /home/oracle
82+
83+
VOLUME ["$PDB_BASE_DIR"]
84+
EXPOSE 1521 5500
85+
86+
# Define default command to start Oracle Database.
87+
CMD $ORACLE_BASE/$RUN_FILE

19.3-small/MinimalDB.dbt

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
<?xml version = '1.0' encoding = 'UTF-8'?>
2+
<DatabaseTemplate name="MinimalDB" description="" version="18.0.0.0.0">
3+
<CommonAttributes>
4+
<option name="OMS" value="false" includeInPDBs="false"/>
5+
<option name="JSERVER" value="false" includeInPDBs="false"/>
6+
<option name="SPATIAL" value="false" includeInPDBs="false"/>
7+
<option name="IMEDIA" value="false" includeInPDBs="false"/>
8+
<option name="ORACLE_TEXT" value="false" includeInPDBs="false">
9+
<tablespace id="SYSAUX"/>
10+
</option>
11+
<option name="XDB_PROTOCOLS" value="false" includeInPDBs="false">
12+
<tablespace id="SYSAUX"/>
13+
</option>
14+
<option name="CWMLITE" value="false" includeInPDBs="false">
15+
<tablespace id="SYSAUX"/>
16+
</option>
17+
<option name="SAMPLE_SCHEMA" value="false" includeInPDBs="false"/>
18+
<option name="NET_EXTENSIONS" value="false" includeInPDBs="false"/>
19+
<option name="APEX" value="false" includeInPDBs="false"/>
20+
<option name="DV" value="false" includeInPDBs="false"/>
21+
</CommonAttributes>
22+
<Variables/>
23+
<CustomScripts Execute="false"/>
24+
<InitParamAttributes>
25+
<InitParams>
26+
<initParam name="db_name" value=""/>
27+
<initParam name="undo_tablespace" value="UNDOTBS1"/>
28+
<initParam name="control_files" value="(&quot;{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl&quot;)"/>
29+
<initParam name="compatible" value="18.0.0"/>
30+
<initParam name="audit_file_dest" value="{ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump"/>
31+
<initParam name="audit_trail" value="none"/>
32+
<initParam name="diagnostic_dest" value="{ORACLE_BASE}"/>
33+
<initParam name="remote_login_passwordfile" value="EXCLUSIVE"/>
34+
<initParam name="dispatchers" value="(PROTOCOL=TCP) (SERVICE={SID}XDB)"/>
35+
</InitParams>
36+
<MiscParams>
37+
<databaseType>MULTIPURPOSE</databaseType>
38+
<maxUserConn>20</maxUserConn>
39+
<percentageMemTOSGA>40</percentageMemTOSGA>
40+
<archiveLogMode>false</archiveLogMode>
41+
<initParamFileName>{ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/pfile/init.ora</initParamFileName>
42+
</MiscParams>
43+
<SPfile useSPFile="true">{ORACLE_HOME}/database/spfile{SID}.ora</SPfile>
44+
</InitParamAttributes>
45+
<StorageAttributes>
46+
<ControlfileAttributes id="Controlfile">
47+
<maxDatafiles>100</maxDatafiles>
48+
<maxLogfiles>16</maxLogfiles>
49+
<maxLogMembers>3</maxLogMembers>
50+
<maxLogHistory>1</maxLogHistory>
51+
<maxInstances>8</maxInstances>
52+
<image name="control01.ctl" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
53+
<image name="control02.ctl" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
54+
</ControlfileAttributes>
55+
<DatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/users01.dbf" con_id="1">
56+
<tablespace>USERS</tablespace>
57+
<temporary>false</temporary>
58+
<online>true</online>
59+
<status>0</status>
60+
<size unit="MB">1</size>
61+
<reuse>true</reuse>
62+
<autoExtend>true</autoExtend>
63+
<increment unit="MB">1</increment>
64+
<maxSize unit="MB">-1</maxSize>
65+
</DatafileAttributes>
66+
<DatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/temp01.dbf" con_id="1">
67+
<tablespace>TEMP</tablespace>
68+
<temporary>false</temporary>
69+
<online>true</online>
70+
<status>0</status>
71+
<size unit="MB">20</size>
72+
<reuse>true</reuse>
73+
<autoExtend>true</autoExtend>
74+
<increment unit="KB">640</increment>
75+
<maxSize unit="MB">-1</maxSize>
76+
</DatafileAttributes>
77+
<DatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/system01.dbf" con_id="1">
78+
<tablespace>SYSTEM</tablespace>
79+
<temporary>false</temporary>
80+
<online>true</online>
81+
<status>0</status>
82+
<size unit="MB">200</size>
83+
<reuse>true</reuse>
84+
<autoExtend>true</autoExtend>
85+
<increment unit="KB">10240</increment>
86+
<maxSize unit="MB">-1</maxSize>
87+
</DatafileAttributes>
88+
<DatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/sysaux01.dbf" con_id="1">
89+
<tablespace>SYSAUX</tablespace>
90+
<temporary>false</temporary>
91+
<online>true</online>
92+
<status>0</status>
93+
<size unit="MB">50</size>
94+
<reuse>true</reuse>
95+
<autoExtend>true</autoExtend>
96+
<increment unit="KB">10240</increment>
97+
<maxSize unit="MB">-1</maxSize>
98+
</DatafileAttributes>
99+
<DatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/undotbs01.dbf" con_id="1">
100+
<tablespace>UNDOTBS1</tablespace>
101+
<temporary>false</temporary>
102+
<online>true</online>
103+
<status>0</status>
104+
<size unit="MB">20</size>
105+
<reuse>true</reuse>
106+
<autoExtend>true</autoExtend>
107+
<increment unit="MB">10</increment>
108+
<maxSize unit="MB">-1</maxSize>
109+
</DatafileAttributes>
110+
<TablespaceAttributes id="USERS" con_id="1">
111+
<temporary>false</temporary>
112+
<defaultTemp>false</defaultTemp>
113+
<undo>false</undo>
114+
<local>true</local>
115+
<blockSize unit="BYTES">-1</blockSize>
116+
<allocation>1</allocation>
117+
<uniAllocSize unit="KB">-1</uniAllocSize>
118+
<initSize unit="KB">128</initSize>
119+
<increment unit="KB">128</increment>
120+
<incrementPercent>0</incrementPercent>
121+
<minExtends>1</minExtends>
122+
<maxExtends>4096</maxExtends>
123+
<minExtendsSize unit="KB">128</minExtendsSize>
124+
<logging>true</logging>
125+
<recoverable>false</recoverable>
126+
<maxFreeSpace>0</maxFreeSpace>
127+
<bigfile>false</bigfile>
128+
<datafilesList>
129+
<TablespaceDatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/users01.dbf"/>
130+
</datafilesList>
131+
</TablespaceAttributes>
132+
<TablespaceAttributes id="SYSTEM" con_id="1">
133+
<temporary>false</temporary>
134+
<defaultTemp>false</defaultTemp>
135+
<undo>false</undo>
136+
<local>true</local>
137+
<blockSize unit="BYTES">-1</blockSize>
138+
<allocation>1</allocation>
139+
<uniAllocSize unit="KB">-1</uniAllocSize>
140+
<initSize unit="KB">64</initSize>
141+
<increment unit="KB">64</increment>
142+
<incrementPercent>50</incrementPercent>
143+
<minExtends>1</minExtends>
144+
<maxExtends>-1</maxExtends>
145+
<minExtendsSize unit="KB">64</minExtendsSize>
146+
<logging>true</logging>
147+
<recoverable>false</recoverable>
148+
<maxFreeSpace>0</maxFreeSpace>
149+
<bigfile>false</bigfile>
150+
<datafilesList>
151+
<TablespaceDatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/system01.dbf"/>
152+
</datafilesList>
153+
</TablespaceAttributes>
154+
<TablespaceAttributes id="TEMP" con_id="1">
155+
<temporary>true</temporary>
156+
<defaultTemp>true</defaultTemp>
157+
<undo>false</undo>
158+
<local>true</local>
159+
<blockSize unit="BYTES">-1</blockSize>
160+
<allocation>1</allocation>
161+
<uniAllocSize unit="KB">-1</uniAllocSize>
162+
<initSize unit="KB">64</initSize>
163+
<increment unit="KB">64</increment>
164+
<incrementPercent>0</incrementPercent>
165+
<minExtends>1</minExtends>
166+
<maxExtends>0</maxExtends>
167+
<minExtendsSize unit="KB">64</minExtendsSize>
168+
<logging>true</logging>
169+
<recoverable>false</recoverable>
170+
<maxFreeSpace>0</maxFreeSpace>
171+
<bigfile>false</bigfile>
172+
<datafilesList>
173+
<TablespaceDatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/temp01.dbf"/>
174+
</datafilesList>
175+
</TablespaceAttributes>
176+
<TablespaceAttributes id="UNDOTBS1" con_id="1">
177+
<temporary>false</temporary>
178+
<defaultTemp>false</defaultTemp>
179+
<undo>true</undo>
180+
<local>true</local>
181+
<blockSize unit="BYTES">-1</blockSize>
182+
<allocation>1</allocation>
183+
<uniAllocSize unit="KB">-1</uniAllocSize>
184+
<initSize unit="KB">512</initSize>
185+
<increment unit="KB">512</increment>
186+
<incrementPercent>50</incrementPercent>
187+
<minExtends>8</minExtends>
188+
<maxExtends>4096</maxExtends>
189+
<minExtendsSize unit="KB">512</minExtendsSize>
190+
<logging>true</logging>
191+
<recoverable>false</recoverable>
192+
<maxFreeSpace>0</maxFreeSpace>
193+
<bigfile>false</bigfile>
194+
<datafilesList>
195+
<TablespaceDatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/undotbs01.dbf"/>
196+
</datafilesList>
197+
</TablespaceAttributes>
198+
<TablespaceAttributes id="SYSAUX" con_id="1">
199+
<temporary>false</temporary>
200+
<defaultTemp>false</defaultTemp>
201+
<undo>false</undo>
202+
<local>true</local>
203+
<blockSize unit="BYTES">-1</blockSize>
204+
<allocation>1</allocation>
205+
<uniAllocSize unit="KB">-1</uniAllocSize>
206+
<initSize unit="KB">64</initSize>
207+
<increment unit="KB">64</increment>
208+
<incrementPercent>50</incrementPercent>
209+
<minExtends>1</minExtends>
210+
<maxExtends>4096</maxExtends>
211+
<minExtendsSize unit="KB">64</minExtendsSize>
212+
<logging>true</logging>
213+
<recoverable>false</recoverable>
214+
<maxFreeSpace>0</maxFreeSpace>
215+
<bigfile>false</bigfile>
216+
<datafilesList>
217+
<TablespaceDatafileAttributes id="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/sysaux01.dbf"/>
218+
</datafilesList>
219+
</TablespaceAttributes>
220+
<RedoLogGroupAttributes id="1">
221+
<reuse>false</reuse>
222+
<fileSize unit="MB">250</fileSize>
223+
<Thread>1</Thread>
224+
<member ordinal="0" memberName="redo01.log" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
225+
</RedoLogGroupAttributes>
226+
<RedoLogGroupAttributes id="2">
227+
<reuse>false</reuse>
228+
<fileSize unit="MB">250</fileSize>
229+
<Thread>1</Thread>
230+
<member ordinal="0" memberName="redo02.log" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
231+
</RedoLogGroupAttributes>
232+
<RedoLogGroupAttributes id="3">
233+
<reuse>false</reuse>
234+
<fileSize unit="MB">250</fileSize>
235+
<Thread>1</Thread>
236+
<member ordinal="0" memberName="redo03.log" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
237+
</RedoLogGroupAttributes>
238+
</StorageAttributes>
239+
</DatabaseTemplate>

19.3-small/checkSpace.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# LICENSE UPL 1.0
3+
#
4+
# Copyright (c) 1982-2018 Oracle and/or its affiliates. All rights reserved.
5+
#
6+
# Since: January, 2017
7+
# Author: gerald.venzl@oracle.com
8+
# Description: Checks the available space of the system.
9+
#
10+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
11+
#
12+
13+
REQUIRED_SPACE_GB=18
14+
AVAILABLE_SPACE_GB=`df -PB 1G / | tail -n 1 | awk '{ print $4 }'`
15+
16+
if [ $AVAILABLE_SPACE_GB -lt $REQUIRED_SPACE_GB ]; then
17+
script_name=`basename "$0"`
18+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 5052
19+
echo "$script_name: ERROR - There is not enough space available in the docker container."
20+
echo "$script_name: The container needs at least $REQUIRED_SPACE_GB GB, but only $AVAILABLE_SPACE_GB GB are available."
21+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
22+
exit 1;
23+
fi;

0 commit comments

Comments
 (0)
0