|
| 1 | +# LICENSE UPL 1.0 |
| 2 | +# |
| 3 | +# Copyright (c) 2014, 2024, Oracle and/or its affiliates. |
| 4 | +# |
| 5 | +# Container image template for Oracle Instant Client |
| 6 | +# |
| 7 | +# HOW TO BUILD THIS IMAGE AND RUN A CONTAINER |
| 8 | +# -------------------------------------------- |
| 9 | +# |
| 10 | +# Execute: |
| 11 | +# $ podman build --pull -t oraclelinux9-instantclient:19 . |
| 12 | +# $ podman run -ti --rm oraclelinux9-instantclient:19 sqlplus /nolog |
| 13 | +# |
| 14 | +# NOTES |
| 15 | +# ----- |
| 16 | +# |
| 17 | +# Applications using Oracle Call Interface (OCI) 19 can connect to |
| 18 | +# Oracle Database 11.2 or later. Some tools may have other |
| 19 | +# restrictions. |
| 20 | +# |
| 21 | +# Oracle Instant Client 19 automatically configures the global library search |
| 22 | +# path to include Instant Client libraries. |
| 23 | +# |
| 24 | +# OPTIONAL ORACLE CONFIGURATION FILES |
| 25 | +# ----------------------------------- |
| 26 | +# |
| 27 | +# Optional Oracle Network and Oracle client configuration files can be put in the |
| 28 | +# default configuration file directory /usr/lib/oracle/<version>/client64/lib/network/admin. |
| 29 | +# Configuration files include tnsnames.ora, sqlnet.ora, oraaccess.xml and |
| 30 | +# cwallet.sso. You can use a container volume to mount the directory containing |
| 31 | +# the files at runtime, for example: |
| 32 | +# |
| 33 | +# podman run -v /my/host/wallet_dir:/usr/lib/oracle/19.19/client64/lib/network/admin:Z,ro . . . |
| 34 | +# |
| 35 | +# This avoids embedding private information such as wallets in images. If you |
| 36 | +# do choose to include network configuration files in images, you can use a |
| 37 | +# Dockerfile COPY, for example: |
| 38 | +# |
| 39 | +# COPY tnsnames.ora sqlnet.ora /usr/lib/oracle/${release}.${update}/client64/lib/network/admin/ |
| 40 | +# |
| 41 | +# There is no need to set the TNS_ADMIN environment variable when files are in |
| 42 | +# the container's default configuration file directory, as shown. |
| 43 | +# |
| 44 | +# ORACLE INSTANT CLIENT PACKAGES |
| 45 | +# ------------------------------ |
| 46 | +# |
| 47 | +# Instant Client 19c Packages for Oracle Linux 9 are available from |
| 48 | +# https://yum.oracle.com/repo/OracleLinux/OL9/oracle/instantclient/x86_64/index.html |
| 49 | +# Also see https://yum.oracle.com/oracle-instant-client.html |
| 50 | +# |
| 51 | +# Base - one of these packages is required to run applications and tools |
| 52 | +# oracle-instantclientXX.Y-basic : Basic Package - All files required to run OCI, OCCI, and JDBC-OCI applications |
| 53 | +# 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 |
| 54 | +# |
| 55 | +# Tools - optional packages (requires the 'basic' package) |
| 56 | +# oracle-instantclientXX.Y-sqlplus : SQL*Plus Package - The SQL*Plus command line tool for SQL and PL/SQL queries |
| 57 | +# oracle-instantclientXX.Y-tools : Tools Package - Includes Data Pump, SQL*Loader and Workload Replay Client |
| 58 | +# |
| 59 | +# Development and Runtime - optional packages (requires the 'basic' package) |
| 60 | +# oracle-instantclientXX.Y-devel : SDK Package - Additional header files and an example makefile for developing Oracle applications with Instant Client |
| 61 | +# oracle-instantclientXX.Y-jdbc : JDBC Supplement Package - Additional support for Internationalization under JDBC |
| 62 | +# oracle-instantclientXX.Y-odbc : ODBC Package - Additional libraries for enabling ODBC applications |
| 63 | +# |
| 64 | +# PREBUILT CONTAINER |
| 65 | +# ------------------ |
| 66 | +# |
| 67 | +# A prebuilt container from this Dockerfile is available from |
| 68 | +# https://github.com/orgs/oracle/packages/container/package/oraclelinux9-instantclient |
| 69 | +# and can be pulled with: |
| 70 | +# podman pull ghcr.io/oracle/oraclelinux9-instantclient:19 |
| 71 | + |
| 72 | +FROM oraclelinux:9 |
| 73 | + |
| 74 | +ARG release=19 |
| 75 | +ARG update=19 |
| 76 | + |
| 77 | +RUN dnf -y install oracle-instantclient-release-el9 && \ |
| 78 | + dnf -y install oracle-instantclient${release}.${update}-basic oracle-instantclient${release}.${update}-devel oracle-instantclient${release}.${update}-sqlplus && \ |
| 79 | + rm -rf /var/cache/dnf |
| 80 | + |
| 81 | +# Uncomment if the tools package is added |
| 82 | +# ENV PATH=$PATH:/usr/lib/oracle/${release}.${update}/client64/bin |
| 83 | + |
| 84 | +CMD ["sqlplus", "-v"] |
0 commit comments