3

i need to connect adminer with oracle but its not supported in the official image. is there any adminer image for oracle connectivity? or if someone can guide me on how to install oci8 extension in current image.

Faheem Sultan
  • 193
  • 2
  • 5
  • 23

2 Answers2

0

You can use the following image in order to connect to oracle https://hub.docker.com/r/soivangoi/nginx-php-adminer-oci8

for the server to use, please note that the syntax is the following :

host_ip:port/service_name (as described in .tnsnames.ora)

0

Dockerfile:

FROM adminer:4.8.1


ENV LD_LIBRARY_PATH /usr/local/instantclient_21_1
ENV ORACLE_HOME /usr/local/instantclient_21_1

USER root
RUN apk update && apk upgrade --available \
 && apk add --no-cache bash autoconf build-base composer libaio libnsl libc6-compat busybox-extras

ADD tmp/. /tmp/.


RUN unzip -d /usr/local/ /tmp/instantclient-basic-linux.x64-21.1.0.0.0.zip
RUN unzip -d /usr/local/ /tmp/instantclient-sdk-linux.x64-21.1.0.0.0.zip
RUN unzip -d /usr/local/ /tmp/instantclient-sqlplus-linux.x64-21.1.0.0.0.zip

RUN ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1
RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
RUN ln -s /lib64/ld-linux-x86-64.so.2 /usr/lib/ld-linux-x86-64.so.2
RUN pear upgrade --force && pecl upgrade

ADD tmp/instantclient.ini /etc/php.d/instantclient.ini

RUN docker-php-ext-configure oci8 --with-oci8=instantclient,$ORACLE_HOME
RUN docker-php-ext-install oci8

the oracle instant clien download URL: https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-basic-linux.x64-21.1.0.0.0.zip https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sqlplus-linux.x64-21.1.0.0.0.zip https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sdk-linux.x64-21.1.0.0.0.zip

the instantclient.ini file content is extension=oci8.so

袁文涛
  • 735
  • 1
  • 10
  • 23