'Docker Oracle Instant Client

I have been trying for 4 days to:

  • Deploy Oracle Instant Client with Docker. I can give you the Dockerfile but it is 96 lines

  • To use Oracle Instant Client on my Linux Ubuntu latest.

In the end I arrive at the same two issues.

When installing OCI 8 with the command:

  • Docker:

RUN echo 'instantclient, / usr / local / instantclient' | pecl install oci8

  • Ubuntu:

echo "instantclient, / opt / oracle / instantclient_12_2" | sudo pecl install oci8

I get the error:

make: *** [Makefile: 194: oci8.lo] Error 1
ERROR: `make 'failed

Could not find a solution.

Make is correctly installed in both cases:

GNU Make 4.2.1 Built for x86_64-pc-linux-gnu Copyright (C) 1988-2016 Free Software Foundation, Inc. GPLv3 + license: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Do you have an idea ? It blocks me for the rest of my work.

BR,

Nicolas.

EDIT :

I try this :

pear download pecl/oci8
tar xvzf oci8-3.0.0.tgz
phpize
./configure --with-oci8=instantclient,/opt/oracle/instantclient_12_2/
make

Same issue :

make: *** [Makefile:194: oci8.lo] Error 1

I'm going crazy...



Solution 1:[1]

If you follow the instructions from Oracle's Github Repo for Docker you should be able to build your own instantclient.

https://github.com/oracle/docker-images/tree/master/OracleInstantClient

Another option will be to just make use of an existing image from their container-registry.

docker pull container-registry.oracle.com/database/instantclient:latest

Best of luck!

Solution 2:[2]

I did it this way:

RUN echo 'instantclient,/opt/oracle/instantclient/lib' | pecl install oci8

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bjarte Brandt
Solution 2 Bruno Garcia