在 docker php:7.0-apache-stretch 中安装 php7.0-sybase



在我的容器上(来自php:7.0-apache-stretch(

apt update
apt install php7.0-sybase

结果:

E: Package 'php7.0-sybase' has no installation candidate

File/etc/apt/sources.list :

deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main

如何安装此软件包?

谢谢

下面与我一起php:5.6-apache连接到Sybase:

我使用官方PHP映像中提供的脚本docker-php-ext-configuredocker-php-ext-install来安装sybase_ct扩展。

并使用 FreeTDS 连接到 Sybase 服务器。

这是我的 Dockerfile:

FROM php:5.6-apache
RUN apt-get update && apt-get install -y  unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc 
&& docker-php-ext-configure sybase_ct --with-sybase-ct=/usr 
&& docker-php-ext-install sybase_ct
COPY ./src/ /var/www/html/
COPY ./odbcinst.ini /etc/
COPY ./freetds.conf /home/
RUN cat /home/freetds.conf >> /etc/freetds/freetds.conf

已配置odbcinst.ini文件复制到/etc/odbcinst.ini

[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so

已配置freetds.conf文件以添加到/etc/freetds/freetds.conf

# Sybase Server
[ServerName]
host = example.com
port = 5000
tds version = 5.0

最新更新