Skip to content

Commit c116592

Browse files
committed
Adding minimal images for Oracle databases.
Images are trimmed down as much as possible to minimize the build time on Travis CI.
1 parent 6ab2816 commit c116592

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4421
-11
lines changed

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
/12.2.0.1/linuxx64_12201_database.zip
2-
/12.1.0.2/linuxamd64_12102_database_1of2.zip
3-
/12.1.0.2/linuxamd64_12102_database_2of2.zip
4-
/12.1.0.2/linuxamd64_12102_database_se2_2of2.zip
5-
/12.1.0.2/linuxamd64_12102_database_se2_1of2.zip
6-
/18.3/LINUX.X64_180000_db_home.zip
1+
*.zip

12.1.0.2-small-no-pdb/Checksum.se2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dadbf2cfbc9b53f92d0b07f6677af966 linuxamd64_12102_database_se2_1of2.zip
2+
2bda8cd4883bbd3f892dc152e568fc9e linuxamd64_12102_database_se2_2of2.zip

12.1.0.2-small-no-pdb/Dockerfile

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

12.1.0.2-small-no-pdb/MinimalDB.dbt

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

12.1.0.2-small-no-pdb/checkSpace.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
# LICENSE CDDL 1.0 + GPL 2.0
3+
#
4+
# Copyright (c) 1982-2017 Oracle and/or its affiliates. All rights reserved.
5+
#
6+
# Since: January, 2017
7+
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=12
14+
if [ `df -B 1G . | tail -n 1 | awk '{print $4'}` -lt $REQUIRED_SPACE_GB ]; then
15+
script_name=`basename "$0"`
16+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
17+
echo "$script_name: ERROR - There is not enough space available in the docker container."
18+
echo "$script_name: The container needs at least $REQUIRED_SPACE_GB GB available."
19+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
20+
exit 1;
21+
fi;

0 commit comments

Comments
 (0)