Oracle on Alpine linux

前端 未结 5 538
南笙
南笙 2021-01-05 00:02

I am trying to install OCI8 extension on my Alpine Linux Docker environment. Although there are several places saying it won\'t work, there are some which say it actually do

5条回答
  •  耶瑟儿~
    2021-01-05 00:23

    I might be late to answer this. I got the same problem of having a alpine base image and add oracle client to that. So i came up with this solution - https://github.com/Shrinidhikulkarni7/OracleClient_Alpine

    Here is the Dockerfile, but you would also need the shell script in it for it to work.

    FROM alpine:latest
    
    ENV LD_LIBRARY_PATH=/lib
    
    RUN wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basic-linux.x64-19.3.0.0.0dbru.zip && \
        unzip instantclient-basic-linux.x64-19.3.0.0.0dbru.zip && \
        cp -r instantclient_19_3/* /lib && \
        rm -rf instantclient-basic-linux.x64-19.3.0.0.0dbru.zip && \
        apk add libaio
    
    ADD script.sh /root/script.sh
    
    RUN /root/script.sh
    
    

    Over here I'm directly downloading the oracle client inside image, setting the path, adding packages and finally using the shell script for creating symbolic link.

提交回复
热议问题