-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#16 Oracle Express Edition - Image, Containers
- Loading branch information
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
version: '3' | ||
volumes: | ||
oracle-db-xe: | ||
driver: local | ||
|
||
networks: | ||
oracle-network-xe: | ||
driver: bridge | ||
|
||
services: | ||
#Oracle Database Express Edition | ||
oracle-xe: | ||
image: container-registry.oracle.com/database/express:latest | ||
container_name: oracle-xe | ||
ports: | ||
- "1521:1521" | ||
networks: | ||
- oracle-network-xe | ||
healthcheck: | ||
test: ["CMD-SHELL", "cat /sql/init.sql | sqlplus -S SYS/Oradoc_db1 AS SYSDBA"] | ||
start_period: 60s | ||
interval: 10s | ||
timeout: 5s | ||
retries: 10 | ||
volumes: | ||
- oracle-db-xe:/opt/oracle/oradata | ||
- ./init.sql:/sql/init.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
version: '3' | ||
|
||
include: | ||
- docker-compose.db-oracle-xe.yml | ||
|
||
services: | ||
|
||
# -- ORACLE SERVICE -- | ||
|
||
rdb_oracle-xe: | ||
container_name: rdb_oracle-xe | ||
image: ghcr.io/krlmlr/rdb/r-oracle-xe | ||
platform: linux/amd64 | ||
tty: true | ||
stdin_open: true | ||
depends_on: | ||
oracle-xe: | ||
condition: service_healthy | ||
networks: | ||
- oracle-network-xe | ||
volumes: | ||
# simple test | ||
- ./test/test-oracle.R:/root/workspace/.Rprofile | ||
entrypoint: ["R"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
FROM ghcr.io/cynkra/rig-ubuntu-dbi:main | ||
|
||
RUN mkdir -p /root/workspace | ||
|
||
WORKDIR /opt/oracle/ | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y libaio1 wget unzip | ||
|
||
# Download the Oracle Instant Client and ODBC Drivers | ||
RUN wget https://download.oracle.com/otn_software/linux/instantclient/1921000/instantclient-basic-linux.x64-19.21.0.0.0dbru.zip | ||
RUN wget https://download.oracle.com/otn_software/linux/instantclient/1921000/instantclient-odbc-linux.x64-19.21.0.0.0dbru.zip | ||
|
||
RUN unzip instantclient-basic-linux.x64-19.21.0.0.0dbru.zip | ||
RUN unzip instantclient-odbc-linux.x64-19.21.0.0.0dbru.zip | ||
RUN rm instantclient-basic-linux.x64-19.21.0.0.0dbru.zip | ||
RUN rm instantclient-odbc-linux.x64-19.21.0.0.0dbru.zip | ||
|
||
RUN sh -c "echo /opt/oracle/instantclient_19_21 > \ | ||
/etc/ld.so.conf.d/oracle-instantclient.conf" | ||
RUN ldconfig | ||
|
||
RUN export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_21:$LD_LIBRARY_PATH | ||
RUN export PATH=/opt/oracle/instantclient_19_21:$PATH | ||
|
||
# Path to the odbc.ini file | ||
ARG ODBC_FILE="/etc/odbc.ini" | ||
|
||
# Create the odbc.ini file if it doesn't exist, and append the required content | ||
RUN mkdir -p $(dirname $ODBC_FILE) && \ | ||
{ \ | ||
echo "[oracle]"; \ | ||
echo "Driver = OracleODBC-19c"; \ | ||
echo "Server = oracle-xe"; \ | ||
echo "ServerName = //oracle-xe:1521/XE"; \ | ||
echo "Port = 1521"; \ | ||
echo "Database = XE"; \ | ||
echo ""; \ | ||
} >> $ODBC_FILE | ||
|
||
# Path to the odbc.ini file | ||
ARG ODBCI_FILE="/etc/odbcinst.ini" | ||
|
||
# Create the odbc.ini file if it doesn't exist, and append the required content | ||
RUN mkdir -p $(dirname $ODBCI_FILE) && \ | ||
{ \ | ||
echo "[OracleODBC-19c]"; \ | ||
echo "Description = Oracle ODBC driver for Oracle 19c"; \ | ||
echo "Driver = /opt/oracle/instantclient_19_21/libsqora.so.19.1"; \ | ||
echo "FileUsage = 1"; \ | ||
echo ""; \ | ||
} >> $ODBCI_FILE | ||
|
||
WORKDIR /root/workspace |