Skip to content

Commit 9b43467

Browse files
authored
Merge pull request #47 from fuzziebrain/temp-xe21c-support
Temp xe21c support
2 parents 8bec5b6 + 68e42e7 commit 9b43467

File tree

4 files changed

+55
-38
lines changed

4 files changed

+55
-38
lines changed

01-build.sh

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,46 @@ if [ -d 'dockerfiles' ]; then
4444
rm -rf dockerfiles;
4545
fi
4646

47-
echo "##### Grabbing official Docker images from Oracle #####"
48-
git clone https://github.com/oracle/docker-images.git tmp
49-
50-
mv tmp/OracleDatabase/SingleInstance/dockerfiles/ .
51-
52-
rm -rf tmp/
53-
54-
echo "##### Staging RPM #####"
55-
if [ $DB_VERSION = '21.3.0' ]; then
56-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_213000_db_home.zip
57-
DOCKER_FILE=Dockerfile
58-
elif [ $DB_VERSION = '19.3.0' ]; then
59-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_193000_db_home.zip
60-
DOCKER_FILE=Dockerfile
61-
elif [ $DB_VERSION = '18.4.0' ] && [ $DB_EDITION = 'xe' ]; then
62-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/oracle-database-xe-18c-1.0-1.x86_64.rpm
63-
DOCKER_FILE=Dockerfile.$DB_EDITION
64-
elif [ $DB_VERSION = '18.3.0' ]; then
65-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_180000_db_home.zip
66-
DOCKER_FILE=Dockerfile
67-
elif [ $DB_VERSION = '12.2.0.1' ]; then
68-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/linuxx64_12201_database.zip
69-
DOCKER_FILE=Dockerfile
70-
elif [ $DB_VERSION = '12.1.0.2' ]; then
71-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/linuxamd64_12102_database_1of2.zip
72-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/linuxamd64_12102_database_2of2.zip
73-
DOCKER_FILE=Dockerfile.$DB_EDITION
74-
elif [ $DB_VERSION = '11.2.0.2' ]; then
75-
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
76-
DOCKER_FILE=Dockerfile.$DB_EDITION
47+
if [ $DB_VERSION = '21.3.0' ] && [ $DB_EDITION = 'xe' ]; then
48+
echo "##### Grabbing custom Docker images from Oracle #####"
49+
git clone https://github.com/fuzziebrain/docker-oracledb21c-xe.git
50+
51+
mkdir dockerfiles
52+
mv docker-oracledb21c-xe dockerfiles/$DB_VERSION
7753
else
78-
echo "Unknown or unsupported database version and/or edition."
54+
echo "##### Grabbing official Docker images from Oracle #####"
55+
git clone https://github.com/oracle/docker-images.git tmp
56+
57+
mv tmp/OracleDatabase/SingleInstance/dockerfiles/ .
58+
59+
rm -rf tmp/
60+
61+
echo "##### Staging RPM #####"
62+
if [ $DB_VERSION = '21.3.0' ]; then
63+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_213000_db_home.zip
64+
DOCKER_FILE=Dockerfile
65+
elif [ $DB_VERSION = '19.3.0' ]; then
66+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_193000_db_home.zip
67+
DOCKER_FILE=Dockerfile
68+
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
70+
DOCKER_FILE=Dockerfile.$DB_EDITION
71+
elif [ $DB_VERSION = '18.3.0' ]; then
72+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/LINUX.X64_180000_db_home.zip
73+
DOCKER_FILE=Dockerfile
74+
elif [ $DB_VERSION = '12.2.0.1' ]; then
75+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/linuxx64_12201_database.zip
76+
DOCKER_FILE=Dockerfile
77+
elif [ $DB_VERSION = '12.1.0.2' ]; then
78+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/linuxamd64_12102_database_1of2.zip
79+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/linuxamd64_12102_database_2of2.zip
80+
DOCKER_FILE=Dockerfile.$DB_EDITION
81+
elif [ $DB_VERSION = '11.2.0.2' ]; then
82+
cd dockerfiles/$DB_VERSION && curl --progress-bar -O file://$FILES_DIR/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
83+
DOCKER_FILE=Dockerfile.$DB_EDITION
84+
else
85+
echo "Unknown or unsupported database version and/or edition."
86+
fi
7987
fi
8088

8189
# TODO: test OML4R support for 21.3.0
@@ -110,7 +118,11 @@ if [[ $ALLOW_DB_PATCHING =~ (Y|y) ]]; then
110118
fi
111119

112120
echo "##### Building Docker Image for Oracle Database ${DB_VERSION} ${DB_EDITION} #####"
113-
cd dockerfiles && . buildContainerImage.sh -v ${DB_VERSION} ${DB_EDITION_FLAG}
121+
if [ $DB_VERSION = '21.3.0' ] && [ $DB_EDITION = 'xe' ]; then
122+
cd dockerfiles/${DB_VERSION} && docker build -t oracle/database:${DB_VERSION}-${DB_EDITION} .
123+
else
124+
cd dockerfiles && . buildContainerImage.sh -v ${DB_VERSION} ${DB_EDITION_FLAG}
125+
fi
114126

115127
cd $BASE_DIR
116128
echo "##### Done #####"

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
1. Git clone this repository and set it as the working directory.
1919
1. Download the installer files:
20-
* The required Oracle Database installation files from [OTN](https://www.oracle.com/technetwork/database/) (supports versions up to 21.3.0 as of August 17, 2021). **Note:** For [Oracle Database 18c XE](https://oracle.com/xe), you are no longer required to download the binaries (see issue #39).
20+
* The required Oracle Database installation files from [OTN](https://www.oracle.com/technetwork/database/) (supports versions up to 21.3.0 including Express Edition, as of September 22, 2021). **Note:** For [Oracle Database 21c XE](https://oracle.com/xe), you are no longer required to download the binaries (see issue #39).
2121
* [Oracle Application Express](https://apex.oracle.com/download) (supports versions up 21.1 as of May 12, 2021)
2222
* [Oracle REST Data Services](https://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html) (supports versions up to 21.2.0.174.1826 as of July 10, 2021)
23-
1. For releases after [0.6.0](https://github.com/fuzziebrain/docker-apex-stack/releases/tag/0.6.0), either choose to use the binaries from [OpenJDK](https://openjdk.java.net/) or download a licensed Java runtime from Oracle. Please refer to the additonal notes section [below](#Additional-Notes-About-the-Settings-File) for details about the `INSTALL_FILE_JAVA` parameter.
23+
1. For releases after [0.6.0](https://github.com/fuzziebrain/docker-apex-stack/releases/tag/0.6.0), either choose to use the binaries from [OpenJDK](https://openjdk.java.net/), download a licensed Java runtime, or the [free to use](https://blogs.oracle.com/java/post/free-java-license) Java 17 from Oracle. Please refer to the additonal notes section [below](#Additional-Notes-About-the-Settings-File) for details about the `INSTALL_FILE_JAVA` parameter.
2424
1. Place all installer files in the sub-directory `files`.
2525
1. Create a file that contains the required environment variables for your build. Please refer to the additonal notes [below](#Additional-Notes-About-the-Settings-File) for more information about the various parameters that can be set. Included in this repository are two examples or templates that you can use:
2626
* [`settings.env.sample`](./settings.env.sample).
@@ -44,6 +44,8 @@
4444
1. Enter `Y` to continue.
4545
1. Wait till there is minimal or no activity in the script then go to http://localhost:50080/ords/apex.
4646
47+
If you are new to APEX, then I highly recommend checking out some of the learning resources [here](https://apex.oracle.com/en/learn/).
48+
4749
```
4850
$ ./quickstart.sh
4951
Enter an email address for your APEX administrator (required): apexdev@example.com
@@ -70,8 +72,9 @@ Type "Y" to continue or CTRL-C to exit: y
7072
* SQL Developer Web is now availablel with ORDS version 19.4. This feature is enabled by default. To turn it off, set the environment variable `SQLDEVWEB` to `N`. The REST-enabled SQL feature can be managed by the variable `REST_ENABLED_SQL`, but note that this value is ignored if SQL Developer Web is activated. For builds with earlier ORDS versions, the added configuration properties are safely ignored.
7173
* `DATABASEAPI` parameter added to enable Database API support for ORDS 19.x and later.
7274
* The variable `INSTALL_FILE_JAVA` accepts the following values:
73-
* `openjdk1.8`
75+
* `java17`
7476
* `openjdk11`
77+
* `openjdk1.8`
7578
* The filename of Java runtime tarball that you can download from [here](https://www.oracle.com/technetwork/java/javase/downloads/). It is recommended that you download the latest Java 8 server JRE, e.g. `server-jre-8u291-linux-x64.tar.gz`.
7679
* Using the sample settings, the following are accessible:
7780
| Port | Application | URL |

quickstart.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ APEX_REST_PUBLIC_USER_PWD=$ORACLE_PWD
5757
ORDS_PUBLIC_USER_PWD=$ORACLE_PWD
5858
INSTALL_FILE_APEX=apex-latest.zip
5959
INSTALL_FILE_ORDS=ords-latest.zip
60-
INSTALL_FILE_JAVA=openjdk11
60+
INSTALL_FILE_JAVA=java17
6161
DOCKER_ORDS_PORT=50080
6262
DOCKER_EM_PORT=55500
6363
DOCKER_DB_PORT=51521
64-
DB_VERSION=18.4.0
64+
DB_VERSION=21.3.0
6565
DB_EDITION=xe
6666
DOCKER_NETWORK_NAME=das_network
6767
ALLOW_DB_PATCHING=N

scripts/setup/01-install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export SCRIPT_DIR=$SCRIPTS_ROOT
66
export FILES_DIR=/tmp/files
77

88
echo "##### Install dependencies if required #####"
9-
if [ $INSTALL_FILE_JAVA == 'openjdk1.8' ]; then
9+
if [ $INSTALL_FILE_JAVA == 'java17' ]; then
10+
yum install -y https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm
11+
elif [ $INSTALL_FILE_JAVA == 'openjdk1.8' ]; then
1012
yum install -y java-1.8.0-openjdk
1113
elif [ $INSTALL_FILE_JAVA == 'openjdk11' ]; then
1214
yum install -y java-11-openjdk

0 commit comments

Comments
 (0)