Skip to content

Commit 17b0c72

Browse files
committed
Optionally allows you to use a local RPM.. See #39, #48, and #50.
1 parent 9b43467 commit 17b0c72

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

01-build.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ DB_EDITION=$(echo ${DB_EDITION:-xe} | tr '[:upper:]' '[:lower:]')
1010
FILES_DIR=${FILES_DIR:-$BASE_DIR/files}
1111
ALLOW_DB_PATCHING=${ALLOW_DB_PATCHING:-N}
1212
OML4R_SUPPORT=${OML4R_SUPPORT:-N}
13+
XE_DOWNLOAD_BASE_URL="https://download.oracle.com/otn-pub/otn_software/db-express/"
1314

1415
SED_OPTS='-i -r'
1516
if [[ "$OSTYPE" == "darwin"* ]]; then
@@ -50,6 +51,12 @@ if [ $DB_VERSION = '21.3.0' ] && [ $DB_EDITION = 'xe' ]; then
5051

5152
mkdir dockerfiles
5253
mv docker-oracledb21c-xe dockerfiles/$DB_VERSION
54+
55+
if [[ $XE_NO_DOWNLOAD =~ (Y|y) ]]; then
56+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/oracle-database-xe-21c-1.0-1.ol7.x86_64.rpm
57+
sed $SED_OPTS "s|${XE_DOWNLOAD_BASE_URL}||g" ${DOCKER_FILE:-Dockerfile}
58+
sed $SED_OPTS "s|^(COPY)(.+CHECK_SPACE_FILE.+INSTALL_DIR/)$|\1 \$INSTALL_FILE_1\2|g" ${DOCKER_FILE:-Dockerfile}
59+
fi
5360
else
5461
echo "##### Grabbing official Docker images from Oracle #####"
5562
git clone https://github.com/oracle/docker-images.git tmp
@@ -66,8 +73,12 @@ else
6673
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_193000_db_home.zip
6774
DOCKER_FILE=Dockerfile
6875
elif [ $DB_VERSION = '18.4.0' ] && [ $DB_EDITION = 'xe' ]; then
69-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/oracle-database-xe-18c-1.0-1.x86_64.rpm
7076
DOCKER_FILE=Dockerfile.$DB_EDITION
77+
if [[ $XE_NO_DOWNLOAD =~ (Y|y) ]]; then
78+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/oracle-database-xe-18c-1.0-1.x86_64.rpm
79+
sed $SED_OPTS "s|${XE_DOWNLOAD_BASE_URL}||g" ${DOCKER_FILE:-Dockerfile}
80+
sed $SED_OPTS "s|^(COPY)(.+CHECK_SPACE_FILE.+INSTALL_DIR/)$|\1 \$INSTALL_FILE_1\2|g" ${DOCKER_FILE:-Dockerfile}
81+
fi
7182
elif [ $DB_VERSION = '18.3.0' ]; then
7283
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_180000_db_home.zip
7384
DOCKER_FILE=Dockerfile
@@ -119,7 +130,7 @@ fi
119130

120131
echo "##### Building Docker Image for Oracle Database ${DB_VERSION} ${DB_EDITION} #####"
121132
if [ $DB_VERSION = '21.3.0' ] && [ $DB_EDITION = 'xe' ]; then
122-
cd dockerfiles/${DB_VERSION} && docker build -t oracle/database:${DB_VERSION}-${DB_EDITION} .
133+
cd dockerfiles/${DB_VERSION} && docker build --no-cache -t oracle/database:${DB_VERSION}-${DB_EDITION} .
123134
else
124135
cd dockerfiles && . buildContainerImage.sh -v ${DB_VERSION} ${DB_EDITION_FLAG}
125136
fi

quickstart.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ REST_ENABLED_SQL=Y
7070
RTU_ENABLED=N
7171
SQLDEVWEB=Y
7272
DATABASEAPI=Y
73+
XE_NO_DOWNLOAD=N
7374
EOF
7475

7576
##### Download files #####

settings.env.sample

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ OML4R_SUPPORT=N
3333
REST_ENABLED_SQL=Y
3434
RTU_ENABLED=N
3535
SQLDEVWEB=Y
36-
DATABASEAPI=Y
36+
DATABASEAPI=Y
37+
XE_NO_DOWNLOAD=N

0 commit comments

Comments
 (0)