Oracle Client on Alpine Linux

Shrinidhi Kulkarni
1 min readJan 23, 2020

--

I was about to add oracle client on alpine but when i searched about it, i got zero answers which actually told me how to do it on alpine. All the answers which i found wanted me to have a Ubuntu base image/ any other heavy image. But as a engineer, i would love to keep my images small and would like to continue on alpine, which i’m using from long.

So, I decided to make one my own.

You can access the complete code here — https://github.com/Shrinidhikulkarni7/OracleClient_Alpine

The code of the Dockerfile

Let me break down the script over here.
1. Get the base alpine image.

2. Set the environment variable for LD_LIBRARY_PATH ( which was requirement by oracle)

3. Download the oracle client ( version 19.3.0), unzip it.

4. Copy the downloaded and unziped file to /lib.

5. Remove the zipped file and libaio library.

6. Here comes the main thing. You cannot directly add symbolic links via Dockerfile.

7. So i made a shell script, which does the work of symbolic linking and copied it inside our image and ran it.(symbolic link was requirement by oracle).

This is your oracle image on alpine.

I answered this on stackoverflow as well — https://stackoverflow.com/a/58360959/9363493

Thank you :)

--

--