Skip to content

Commit

Permalink
Initial Instant Client 23c containers
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Jones <[email protected]>
  • Loading branch information
cjbj authored and Djelibeybi committed Jul 1, 2024
1 parent fe736c5 commit d1bbb8b
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 16 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-and-push-instantclient-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- 'OracleInstantClient/*/19/*'
- 'OracleInstantClient/*/21/*'
- 'OracleInstantClient/*/23/*'
- '.github/workflows/build-and-push-instantclient-images.yml'
workflow_dispatch:

Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
if grep -q build-and-push-instantclient-images.yml "${changes}"; then
echo "PUSH: Action updated: rebuilding all images"
ol="oraclelinux7 oraclelinux8 oraclelinux9"
ic="19 21"
ic="19 21 23"
else
echo "PUSH: Rebuilding changed images only"
if grep -q oraclelinux7 "${changes}"; then
Expand All @@ -58,11 +59,14 @@ jobs:
if grep -q /21/ "${changes}"; then
ic="${ic} 21"
fi
if grep -q /23/ "${changes}"; then
ic="${ic} 23"
fi
fi
else
echo "MANUAL: Rebuilding all"
ol="oraclelinux7 oraclelinux8 oraclelinux9"
ic="19 21"
ic="19 21 23"
fi
echo "Rebuilding: ${ol} ${ic}"
echo "ol=${ol}" >> $GITHUB_OUTPUT
Expand Down
40 changes: 26 additions & 14 deletions OracleInstantClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ create and run applications that connect to a remote (or local) Oracle Database.

Oracle client-server version interoperability is detailed in [Doc ID
207303.1](https://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1).
In summary, applications using Oracle Call Interface (OCI) 21 can connect to
Oracle Database 12.1 or later. Applications using Oracle Call Interface (OCI)
19, 18 or 12.2 can connect to Oracle Database 11.2 or later. Some tools may
have other restrictions.
In summary, applications using Oracle Call Interface (OCI) 23 can connect to
Oracle Database 19 or later. Applications using OCI 21 can connect to Oracle
Database 12.1 or later. Applications using OCI 19, 18 or 12.2 can connect to
Oracle Database 11.2 or later. Some tools may have other restrictions.

## Prebuilt Images

Expand All @@ -51,6 +51,23 @@ docker pull ghcr.io/oracle/oraclelinux8-instantclient:21
Prebuilt containers for some language images are also available in the
registry.

## Building Oracle Instant Client 23 Images

Change directory to [`oraclelinux9/23`](oraclelinux9/23) or
[`oraclelinux8/23`](oraclelinux8/23) and run:

```bash
docker build --pull -t oracle/instantclient:23 .
```

The build process automatically installs Instant Client using RPMs directly
from the [Oracle Instant Client (OL9)
repository](https://yum.oracle.com/repo/OracleLinux/OL9/oracle/instantclient23/x86_64/)
or [Oracle Instant Client (OL8) repository](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient23/x86_64/).

Applications using Oracle Call Interface (OCI) 23 can connect to Oracle Database
19 or later. Some tools may have other restrictions.

## Building Oracle Instant Client 21 Images

Change directory to [`oraclelinux7/21`](oraclelinux7/21) or
Expand All @@ -61,10 +78,8 @@ docker build --pull -t oracle/instantclient:21 .
```

The build process automatically installs Instant Client using RPMs directly from
the [Oracle Instant Client repository
(OL8)](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient21/x86_64/)
or [Oracle Instant Client repository
(OL7)](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient21/x86_64/).
the [Oracle Instant Client (OL8) repository](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient21/x86_64/)
or [Oracle Instant Client (OL7) repository](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient21/x86_64/).

Applications using Oracle Call Interface (OCI) 21 can connect to Oracle Database
12.1 or later. Some tools may have other restrictions.
Expand All @@ -80,12 +95,9 @@ docker build --pull -t oracle/instantclient:19 .
```

The build process automatically installs Instant Client using RPMs directly
from the [Oracle Instant Client repository
(OL9)](https://yum.oracle.com/repo/OracleLinux/OL9/oracle/instantclient/x86_64/index.html),
[Oracle Instant Client repository
(OL8)](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html),
or [Oracle Instant Client repository
(OL7)](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html).
from the [Oracle Instant Client (OL9) repository](https://yum.oracle.com/repo/OracleLinux/OL9/oracle/instantclient/x86_64/index.html),
[Oracle Instant Client (OL8) repository](https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html),
or [Oracle Instant Client (OL7) repository](https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/index.html).

Applications using Oracle Call Interface (OCI) 19 can connect to
Oracle Database 11.2 or later. Some tools may have other
Expand Down
80 changes: 80 additions & 0 deletions OracleInstantClient/oraclelinux8/23/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# LICENSE UPL 1.0
#
# Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
#
# Container image template for Oracle Instant Client
#
# HOW TO BUILD THIS IMAGE AND RUN A CONTAINER
# --------------------------------------------
#
# Execute:
# $ podman build --pull -t oraclelinux8-instantclient:23 .
# $ podman run -ti --rm oraclelinux8-instantclient:23 sqlplus /nolog
#
# NOTES
# -----
#
# Applications using Oracle Call Interface (OCI) 23 can connect to Oracle
# Database 19 or later. Some tools may have other restrictions.
#
# Oracle Instant Client 23 automatically configures the global library search
# path to include Instant Client libraries.
#
# OPTIONAL ORACLE CONFIGURATION FILES
# -----------------------------------
#
# Optional Oracle Network and Oracle client configuration files can be put in the
# default configuration file directory /usr/lib/oracle/23/client64/lib/network/admin.
# Configuration files include tnsnames.ora, sqlnet.ora, oraaccess.xml and
# cwallet.sso. You can use a container volume to mount the directory containing
# the files at runtime, for example:
#
# podman run -v /my/host/wallet_dir:/usr/lib/oracle/23/client64/lib/network/admin:Z,ro . . .
#
# This avoids embedding private information such as wallets in images. If you
# do choose to include network configuration files in images, you can use a
# Dockerfile COPY, for example:
#
# COPY tnsnames.ora sqlnet.ora /usr/lib/oracle/23/client64/lib/network/admin/
#
# There is no need to set the TNS_ADMIN environment variable when files are in
# the container's default configuration file directory, as shown.
#
# ORACLE INSTANT CLIENT PACKAGES
# ------------------------------
#
# Instant Client 23 Packages for Oracle Linux 8 are available from
# https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient23/x86_64/
# Also see https://yum.oracle.com/oracle-instant-client.html
#
# Base - one of these packages is required to run applications and tools
# oracle-instantclient-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications
# oracle-instantclient-basiclite : Basic Light Package - Smaller version of the Basic package, with only English error messages and Unicode, ASCII, and Western European character set support
#
# Tools - optional packages (requires the 'basic' package)
# oracle-instantclient-sqlplus : SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries
# oracle-instantclient-tools : Tools Package - Includes Data Pump, SQL*Loader and Workload Replay Client
#
# Development and Runtime - optional packages (requires the 'basic' package)
# oracle-instantclient-devel : SDK Package - Additional header files and an example makefile for developing Oracle applications with Instant Client
# oracle-instantclient-jdbc : JDBC Supplement Package - Additional support for Internationalization under JDBC
# oracle-instantclient-odbc : ODBC Package - Additional libraries for enabling ODBC applications
#
# PREBUILT CONTAINER
# ------------------
#
# A prebuilt container from this Dockerfile is available from
# https://github.com/orgs/oracle/packages/container/package/oraclelinux8-instantclient
# and can be pulled with:
# podman pull ghcr.io/oracle/oraclelinux8-instantclient:23

FROM oraclelinux:8

RUN dnf -y install oracle-instantclient-release-23ai-el8 && \
dnf -y install oracle-instantclient-basic oracle-instantclient-devel oracle-instantclient-sqlplus && \
rm -rf /var/cache/dnf

# Uncomment if the tools package is added
# ENV PATH=$PATH:/usr/lib/oracle/23/client64/bin

CMD ["sqlplus", "-v"]
80 changes: 80 additions & 0 deletions OracleInstantClient/oraclelinux9/23/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# LICENSE UPL 1.0
#
# Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
#
# Container image template for Oracle Instant Client
#
# HOW TO BUILD THIS IMAGE AND RUN A CONTAINER
# --------------------------------------------
#
# Execute:
# $ podman build --pull -t oraclelinux9-instantclient:23 .
# $ podman run -ti --rm oraclelinux9-instantclient:23 sqlplus /nolog
#
# NOTES
# -----
#
# Applications using Oracle Call Interface (OCI) 23 can connect to Oracle
# Database 19 or later. Some tools may have other restrictions.
#
# Oracle Instant Client 23 automatically configures the global library search
# path to include Instant Client libraries.
#
# OPTIONAL ORACLE CONFIGURATION FILES
# -----------------------------------
#
# Optional Oracle Network and Oracle client configuration files can be put in the
# default configuration file directory /usr/lib/oracle/23/client64/lib/network/admin.
# Configuration files include tnsnames.ora, sqlnet.ora, oraaccess.xml and
# cwallet.sso. You can use a container volume to mount the directory containing
# the files at runtime, for example:
#
# podman run -v /my/host/wallet_dir:/usr/lib/oracle/23/client64/lib/network/admin:Z,ro . . .
#
# This avoids embedding private information such as wallets in images. If you
# do choose to include network configuration files in images, you can use a
# Dockerfile COPY, for example:
#
# COPY tnsnames.ora sqlnet.ora /usr/lib/oracle/23/client64/lib/network/admin/
#
# There is no need to set the TNS_ADMIN environment variable when files are in
# the container's default configuration file directory, as shown.
#
# ORACLE INSTANT CLIENT PACKAGES
# ------------------------------
#
# Instant Client 23 Packages for Oracle Linux 9 are available from
# https://yum.oracle.com/repo/OracleLinux/OL9/oracle/instantclient23/x86_64/
# Also see https://yum.oracle.com/oracle-instant-client.html
#
# Base - one of these packages is required to run applications and tools
# oracle-instantclient-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications
# oracle-instantclient-basiclite : Basic Light Package - Smaller version of the Basic package, with only English error messages and Unicode, ASCII, and Western European character set support
#
# Tools - optional packages (requires the 'basic' package)
# oracle-instantclient-sqlplus : SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries
# oracle-instantclient-tools : Tools Package - Includes Data Pump, SQL*Loader and Workload Replay Client
#
# Development and Runtime - optional packages (requires the 'basic' package)
# oracle-instantclient-devel : SDK Package - Additional header files and an example makefile for developing Oracle applications with Instant Client
# oracle-instantclient-jdbc : JDBC Supplement Package - Additional support for Internationalization under JDBC
# oracle-instantclient-odbc : ODBC Package - Additional libraries for enabling ODBC applications
#
# PREBUILT CONTAINER
# ------------------
#
# A prebuilt container from this Dockerfile is available from
# https://github.com/orgs/oracle/packages/container/package/oraclelinux9-instantclient
# and can be pulled with:
# podman pull ghcr.io/oracle/oraclelinux9-instantclient:23

FROM oraclelinux:8

RUN dnf -y install oracle-instantclient-release-23ai-el9 && \
dnf -y install oracle-instantclient-basic oracle-instantclient-devel oracle-instantclient-sqlplus && \
rm -rf /var/cache/dnf

# Uncomment if the tools package is added
# ENV PATH=$PATH:/usr/lib/oracle/23/client64/bin

CMD ["sqlplus", "-v"]

0 comments on commit d1bbb8b

Please sign in to comment.