在 docker 容器中安装 oracle 客户端

Install oracle client in docker container(在 docker 容器中安装 oracle 客户端)
本文介绍了在 docker 容器中安装 oracle 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我使用 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

  1. 看来我必须登录才能下载,有谁知道如何在不登录的情况下下载客户端库的 zip 文件?

  1. 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:

  1. 从 .rpm 文件)64-downloads.html"rel="noreferrer">oracle官方下载中心

  1. 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 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
Mysql Connection Error In Docker with Spriing boot(Docker 中的 Mysql 连接错误与 Spriing 启动)
quot;Can#39;t connect to local MySQL serverquot; in docker-compose(“无法连接到本地 MySQL 服务器在 docker-compose 中)
mySQL init scripts not running with docker-compose(mySQL init 脚本未与 docker-compose 一起运行)
Run command after docker container is started(docker 容器启动后运行命令)
Creating a flattened table/view of a hierarchically-defined set of data(创建分层定义的数据集的扁平表/视图)