Skip to content

Commit 1bc5b4f

Browse files
authored
latest 19c changes (#3041)
* latest 19c changes * lint fixes * lint fixes
1 parent 0f3d9a1 commit 1bc5b4f

File tree

10 files changed

+4191
-3560
lines changed

10 files changed

+4191
-3560
lines changed

OracleDatabase/RAC/OracleRealApplicationClusters/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ Retag it as below as we are going to refer this image as `localhost/oracle/datab
120120
```bash
121121
podman tag localhost/oracle/database-rac:21.3.0 localhost/oracle/database-rac:21c
122122
```
123+
**Note** : There is a known issue with Oracle Database 19.3.0 that causes compilation to fail, as described in [Doc ID 2760289.1](https://support.oracle.com/knowledge/Oracle%20Database%20Products/2760289_1.html): "19c Database Installation/relink fails with: Error in invoking target 'libasmclntsh19.ohso libasmperl19.ohso client_sharedlib' of makefile ins_rdbms.mk".
124+
As a result, Base 19.3.0 software cannot be directly installed on Oracle Linux 9. The fix is included in version 19.21 and later. Therefore, when building Oracle RAC Database Container Images for 19.3.0, you must use `--build-arg BASE_OL_IMAGE=oraclelinux:8`
125+
126+
Example: To build Oracle RAC Database Container Image for version 19.3.0, use below command:
127+
```bash
128+
./buildContainerImage.sh -v 19.3.0 -i -o "--build-arg BASE_OL_IMAGE=oraclelinux:8"
129+
```
123130

124131
### Building Oracle RAC Database Container Slim Image
125132
In this document, an `Oracle RAC Database Container Slim Image` refers to a container image that does not include installation of Oracle Grid Infrastructure and Oracle Database Software Binaries during the Oracle RAC Database Container Image creation.

OracleDatabase/RAC/OracleRealApplicationClusters/containerfiles/19.3.0/Containerfile

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,19 @@ ARG SLIMMING=false
3030
ARG VERSION
3131
# Labels
3232
# ------
33-
LABEL "provider"="Oracle" \
34-
"issues"="https://github.com/oracle/docker-images/issues" \
35-
"volume.setup.location1"="/opt/scripts" \
36-
"volume.startup.location1"="/opt/scripts/startup" \
37-
"port.listener"="1521" \
33+
LABEL "provider"="Oracle" \
34+
"maintainer"="Paramdeep Saini<[email protected]>,Jyoti Prakash Verma<[email protected]>,Saurabh Ahuja<[email protected]>" \
35+
"vendor"="Oracle Corporation" \
36+
"version"="19.3.0" \
37+
"release"="19.3.0" \
38+
"name"="Oracle Database 19c" \
39+
"summary"="Oracle Database 19c" \
40+
"description"="Container Image for Oracle Database Server Release 19c" \
41+
"issues"="https://github.com/oracle/docker-images/issues" \
42+
"volume.data"="/opt/oracle/oradata" \
43+
"volume.setup.location1"="/opt/scripts" \
44+
"volume.startup.location1"="/opt/scripts/startup" \
45+
"port.listener"="1521" \
3846
"port.oemexpress"="5500"
3947

4048
# Argument to control removal of components not needed after db software installation
@@ -50,6 +58,7 @@ ARG IGNORE_PREREQ=false
5058
# Linux Env Variable
5159
# hadolint ignore=DL3044
5260
ENV SETUP_LINUX_FILE="setupLinuxEnv.sh" \
61+
OCI_FILE="ociregion.sh" \
5362
INSTALL_DIR=/opt/scripts \
5463
# Grid Env variables
5564
GRID_INSTALL_RSP="gridsetup_19c.rsp" \
@@ -121,7 +130,7 @@ ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
121130
# Copy binaries
122131
# -------------
123132
# COPY Binaries
124-
COPY $VERSION/$SETUP_LINUX_FILE $VERSION/$GRID_SETUP_FILE $VERSION/$DB_SETUP_FILE $VERSION/$CHECK_SPACE_FILE $VERSION/$FIXUP_PREQ_FILE $INSTALL_SCRIPTS/
133+
COPY $VERSION/$SETUP_LINUX_FILE $OCI_FILE $VERSION/$GRID_SETUP_FILE $VERSION/$DB_SETUP_FILE $VERSION/$CHECK_SPACE_FILE $VERSION/$FIXUP_PREQ_FILE $INSTALL_SCRIPTS/
125134

126135
# Setup Scripts
127136
COPY $VERSION/$RUN_FILE $VERSION/$ADDNODE_RSP $VERSION/$SETUPSSH $VERSION/$GRID_INSTALL_RSP $VERSION/$DBCA_RSP $VERSION/$INITSH $SCRIPT_DIR/
@@ -158,7 +167,7 @@ ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
158167
# Copy binaries
159168
# -------------
160169
# COPY Binaries
161-
COPY $VERSION/$SETUP_LINUX_FILE $VERSION/$GRID_SETUP_FILE $VERSION/$DB_SETUP_FILE $VERSION/$CHECK_SPACE_FILE $VERSION/$FIXUP_PREQ_FILE $INSTALL_SCRIPTS/
170+
COPY $VERSION/$SETUP_LINUX_FILE $OCI_FILE $VERSION/$GRID_SETUP_FILE $VERSION/$DB_SETUP_FILE $VERSION/$CHECK_SPACE_FILE $VERSION/$FIXUP_PREQ_FILE $INSTALL_SCRIPTS/
162171

163172
# Setup Scripts
164173
COPY $VERSION/$RUN_FILE $VERSION/$SETUPSSH $VERSION/$INITSH $SCRIPT_DIR/
@@ -229,6 +238,7 @@ RUN rm -f $INSTALL_DIR/install/* && \
229238
#############################################
230239
# hadolint ignore=DL3006
231240
FROM rac-image-slim-${SLIMMING} AS final
241+
ARG VERSION
232242
ENV GRID_BASE=/u01/app/grid \
233243
GRID_HOME=/u01/app/19c/grid \
234244
DB_BASE=/u01/app/oracle \
@@ -260,8 +270,11 @@ RUN if [ "${SLIMMING}x" != 'truex' ]; then \
260270
rm -f /etc/sysctl.d/99-sysctl.conf && \
261271
rm -f $INSTALL_DIR/install/* && \
262272
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
273+
mkdir /licenses && \
263274
sync
264275

276+
COPY $VERSION/license.txt /licenses/
277+
265278
USER ${USER}
266279
VOLUME ["/common_scripts"]
267280
WORKDIR $WORKDIR

OracleDatabase/RAC/OracleRealApplicationClusters/containerfiles/19.3.0/setupLinuxEnv.sh

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,45 @@
1414
# Setup filesystem and oracle user
1515
# Adjust file permissions, go to /opt/oracle as user 'oracle' to proceed with Oracle installation
1616
# ------------------------------------------------------------
17-
mkdir /asmdisks && \
18-
mkdir /responsefiles && \
19-
chmod ug+x /opt/scripts/startup/*.sh && \
20-
dnf -y install oracle-database-preinstall-19c systemd vim-minimal passwd openssh-server hostname xterm xhost vi policycoreutils-python-utils lsof openssl libxcrypt-compat net-tools which zip unzip tar sudo && \
21-
dnf clean all
17+
## Use OCI yum repos on OCI instead of public yum
18+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
19+
REGION_FILE="$SCRIPT_DIR/ociregion.sh"
20+
21+
if [ ! -f "$REGION_FILE" ]; then
22+
# Call the separate detection script if region file is missing
23+
"$SCRIPT_DIR/ociregion.sh"
24+
fi
25+
26+
if [ -f "$REGION_FILE" ]; then
27+
region=$(cat "$REGION_FILE")
28+
echo "Loaded OCI Region from file: $region"
29+
else
30+
echo "OCI Region file not found. Exiting."
31+
exit 1
32+
fi
33+
# Refer Doc ID 2760289.1 for error- "libxcrypt-compat compat-openssl11" only available in OL9
34+
# Error in invoking target 'libasmclntsh19.ohso libasmperl19.ohso client_sharedlib' of makefile '/u01/app/oracle/product/19c/dbhome_1/rdbms/lib/ins_rdbms.mk'.
35+
# Detect Oracle Linux version
36+
if [ -f /etc/os-release ]; then
37+
ol_ver=$(grep -oP '^VERSION_ID="\K[0-9]+' /etc/os-release)
38+
else
39+
echo "/etc/os-release not found. Cannot detect OS version."
40+
exit 1
41+
fi
42+
43+
mkdir -p /asmdisks
44+
mkdir -p /responsefiles
45+
chmod ug+x /opt/scripts/startup/*.sh
46+
47+
if [ "$ol_ver" == "9" ]; then
48+
dnf -y install oracle-database-preinstall-19c systemd vim-minimal passwd openssh-server hostname xterm xhost vi \
49+
policycoreutils-python-utils lsof openssl libxcrypt-compat net-tools which zip unzip tar sudo rsync expect
50+
dnf clean all
51+
elif [ "$ol_ver" == "8" ]; then
52+
yum -y install systemd oracle-database-preinstall-19c net-tools which zip unzip tar openssl expect e2fsprogs \
53+
openssh-server vim-minimal passwd which sudo hostname policycoreutils-python-utils python3 lsof rsync
54+
yum clean all
55+
else
56+
echo "Unsupported Oracle Linux version: $ol_ver"
57+
exit 1
58+
fi
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# LICENSE UPL 1.0
3+
#
4+
# Copyright (c) 2018,2025 Oracle and/or its affiliates.
5+
#
6+
# Since: January, 2018
7+
8+
# Description: Sets up the unix environment for DB installation.
9+
#
10+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
11+
#
12+
13+
# Setup filesystem and oracle user
14+
# Adjust file permissions, go to /opt/oracle as user 'oracle' to proceed with Oracle installation
15+
# ------------------------------------------------------------
16+
## Use OCI yum repos on OCI instead of public yum repos

0 commit comments

Comments
 (0)