問題描述
我使用 alpine linux 作為基礎鏡像,我需要安裝一個 oracle 客戶端原生庫.我相信你可以從這里下載:
I am using alpine linux as a base image, and I need to install an oracle client native library. I believe you can download from here:
https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
看來我必須登錄才能下載,有誰知道如何在不登錄的情況下下載客戶端庫的 zip 文件?
it looks like I have to login to download, does anyone know how to download a zip file of the client lib without login?
有誰知道如何在 bash 腳本或 dockerfile 中正確安裝客戶端庫?
does anyone know how to install the client library properly in a bash script or dockerfile?
推薦答案
我想出了一些在 ubuntu
Docker 中安裝 Oracle 即時客戶端的不同方法,它可能對其他人有幫助
I have figure out some different way to install Oracle instant client in ubuntu
Docker, it might help others
請按照以下簡單步驟操作:
Follow these simple steps:
從 .rpm 文件)64-downloads.html"rel="noreferrer">oracle官方下載中心
Download oracle instant client (
.rpm
file) from oracle official download center
轉換為 .deb
(您可以使用 apt-get install Alien
)并移動到您工作目錄中的某個位置.
Convert into .deb
(you can use apt-get install alien
) and move somewhere in your working directory.
現在更新您的 Dockerfile
并進行構建
Now Update your Dockerfile
and make build
RUN apt-get update
WORKDIR /opt
ADD ./ORACLE-INSTANT-CLIENT.deb /opt
#if libaio also required
RUN apt-get install libaio1
RUN dpkg -i oracle-instantclient.deb
這篇關于在 docker 容器中安裝 oracle 客戶端的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!