简体   繁体   English

如何在 Docker 中将 AWS Redshift ODBC 驱动安装到 Alpine。 (Node.js)

[英]How to install AWS Redshift ODBC driver to Alpine in Docker. (Node.js)

I am creating a database connection to AWS Redshift using ODBC for Node.js.我正在使用 Node.js 的 ODBC 创建与 AWS Redshift 的数据库连接。 It is easy to install into Windows using the following link.使用以下链接很容易安装到 Windows 中。 https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html

But as I am trying to execute the application using Docker container I have to install is to Node:Alpine.但是当我尝试使用 Docker 容器执行应用程序时,我必须安装到 Node:Alpine。

What are the ways of doing it?有哪些方法?

alpine does not support the C/C++ library version required by the driver. alpine 不支持驱动所需的 C/C++ 库版本。 If you can live with slim, here's how to install:如果您可以忍受苗条,这里是如何安装:

FROM node:lts-slim
RUN apt-get update \
    && apt-get install wget -y \
    && wget https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.45.1000/AmazonRedshiftODBC-64-bit-1.4.45.1000-1.x86_64.deb -qO /tmp/AmazonRedshiftODBC-64-bit-1.4.45.1000-1.x86_64.deb \
    && apt-get install /tmp/AmazonRedshiftODBC-64-bit-1.4.45.1000-1.x86_64.deb \
    && rm /tmp/AmazonRedshiftODBC-64-bit-1.4.45.1000-1.x86_64.deb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM