From d966cdc1058c2e488bb3c2bdd2ad5b789c43cb17 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 31 Oct 2023 16:50:35 +1100 Subject: [PATCH] Add Instant Client on OL9 Signed-off-by: Christopher Jones --- .../build-and-push-instantclient-images.yml | 10 ++- OracleInstantClient/README.md | 18 ++-- .../oraclelinux9/19/Dockerfile | 84 +++++++++++++++++++ 3 files changed, 103 insertions(+), 9 deletions(-) create mode 100755 OracleInstantClient/oraclelinux9/19/Dockerfile diff --git a/.github/workflows/build-and-push-instantclient-images.yml b/.github/workflows/build-and-push-instantclient-images.yml index e91c502f72..3d7874ebe2 100644 --- a/.github/workflows/build-and-push-instantclient-images.yml +++ b/.github/workflows/build-and-push-instantclient-images.yml @@ -39,7 +39,7 @@ jobs: git diff --name-only '${{ github.event.before }}..${{ github.event.after }}' > "${changes}" if grep -q build-and-push-instantclient-images.yml "${changes}"; then echo "PUSH: Action updated: rebuilding all images" - ol="oraclelinux7 oraclelinux8" + ol="oraclelinux7 oraclelinux8 oraclelinux9" ic="19 21" else echo "PUSH: Rebuilding changed images only" @@ -49,6 +49,9 @@ jobs: if grep -q oraclelinux8 "${changes}"; then ol="${ol} oraclelinux8" fi + if grep -q oraclelinux9 "${changes}"; then + ol="${ol} oraclelinux9" + fi if grep -q /19/ "${changes}"; then ic="19" fi @@ -58,7 +61,7 @@ jobs: fi else echo "MANUAL: Rebuilding all" - ol='oraclelinux7 oraclelinux8' + ol='oraclelinux7 oraclelinux8 oraclelinux9' ic="19 21" fi echo "Rebuilding: ${ol} ${ic}" @@ -81,6 +84,9 @@ jobs: do for i in ${{ steps.linux-version.outputs.ic }} do + if [[ ${o} = 'oraclelinux9' && ${i} != '19' ]]; then + continue + fi docker build --tag ghcr.io/${{ steps.repo-owner.outputs.repo-owner }}/${o}-instantclient:${i} OracleInstantClient/${o}/${i} done done diff --git a/OracleInstantClient/README.md b/OracleInstantClient/README.md index 1cda7c6cbc..c2dcc989dc 100644 --- a/OracleInstantClient/README.md +++ b/OracleInstantClient/README.md @@ -9,8 +9,8 @@ packages for ODBC, or to include tools such as Oracle SQL\*Loader. The base images support building and using scripting language APIs that internally call OCI. These include [Python's python-oracledb Thick -mode](https://oracle.github.io/python-oracledb/), [Node.js's -node-oracledb](https://yum.oracle.com/oracle-linux-nodejs.html), [PHP's +mode](https://oracle.github.io/python-oracledb/), [Node.js's node-oracledb +Thick mode](https://yum.oracle.com/oracle-linux-nodejs.html), [PHP's OCI8](https://yum.oracle.com/oracle-linux-php.html), [Go's godror](https://godror.github.io/godror/), [Rust's rust-oracle](https://github.com/kubo/rust-oracle), and [Ruby's @@ -35,6 +35,7 @@ have other restrictions. Pre-built images for Instant Client are in the [GitHub Container Registry](https://github.com/orgs/oracle/packages): + [oracle/packages/container/package/oraclelinux9-instantclient](https://github.com/orgs/oracle/packages/container/package/oraclelinux9-instantclient) [oracle/packages/container/package/oraclelinux8-instantclient](https://github.com/orgs/oracle/packages/container/package/oraclelinux8-instantclient) [oracle/packages/container/package/oraclelinux7-instantclient](https://github.com/orgs/oracle/packages/container/package/oraclelinux7-instantclient) @@ -70,16 +71,19 @@ Applications using Oracle Call Interface (OCI) 21 can connect to Oracle Database ## Building Oracle Instant Client 19 Images -Change directory to [`oraclelinux7/19`](oraclelinux7/19) or -[`oraclelinux8/19`](oraclelinux8/19) and run: +Change directory to [`oraclelinux7/19`](oraclelinux7/19), +[`oraclelinux8/19`](oraclelinux8/19), or [`oraclelinux9/19`](oraclelinux9/19) +and run: ```bash docker build --pull -t oracle/instantclient:19 . ``` -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/instantclient/x86_64/index.html) +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). diff --git a/OracleInstantClient/oraclelinux9/19/Dockerfile b/OracleInstantClient/oraclelinux9/19/Dockerfile new file mode 100755 index 0000000000..b18787717a --- /dev/null +++ b/OracleInstantClient/oraclelinux9/19/Dockerfile @@ -0,0 +1,84 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2014, 2023, Oracle and/or its affiliates. +# +# Container image template for Oracle Instant Client +# +# HOW TO BUILD THIS IMAGE AND RUN A CONTAINER +# -------------------------------------------- +# +# Execute: +# $ podman build --pull -t oraclelinux9-instantclient:19 . +# $ podman run -ti --rm oraclelinux9-instantclient:19 sqlplus /nolog +# +# NOTES +# ----- +# +# Applications using Oracle Call Interface (OCI) 19 can connect to +# Oracle Database 11.2 or later. Some tools may have other +# restrictions. +# +# Oracle Instant Client 19 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//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/19.19/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/${release}.${update}/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 19c Packages for Oracle Linux 8 are available from +# https://yum.oracle.com/repo/OracleLinux/OL8/oracle/instantclient/x86_64/index.html +# Also see https://yum.oracle.com/oracle-instant-client.html +# +# Base - one of these packages is required to run applications and tools +# oracle-instantclientXX.Y-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications +# oracle-instantclientXX.Y-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-instantclientXX.Y-sqlplus : SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries +# oracle-instantclientXX.Y-tools : Tools Package - Includes Data Pump, SQL*Loader and Workload Replay Client +# +# Development and Runtime - optional packages (requires the 'basic' package) +# oracle-instantclientXX.Y-devel : SDK Package - Additional header files and an example makefile for developing Oracle applications with Instant Client +# oracle-instantclientXX.Y-jdbc : JDBC Supplement Package - Additional support for Internationalization under JDBC +# oracle-instantclientXX.Y-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:19 + +FROM oraclelinux:9 + +ARG release=19 +ARG update=19 + +RUN dnf -y install oracle-release-el9 && \ + dnf -y install oracle-instantclient${release}.${update}-basic oracle-instantclient${release}.${update}-devel oracle-instantclient${release}.${update}-sqlplus && \ + rm -rf /var/cache/dnf + +# Uncomment if the tools package is added +# ENV PATH=$PATH:/usr/lib/oracle/${release}.${update}/client64/bin + +CMD ["sqlplus", "-v"]