Merge pull request #2046 from lanphan/mssql

update adminer to support SQL Server
This commit is contained in:
Shao Yu-Lung (Allen) 2021-06-12 10:50:41 +08:00 committed by GitHub
commit ef1140dc4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -9,19 +9,19 @@ VOLUME /sessions
# SQL SERVER: # SQL SERVER:
##################################### #####################################
USER root USER root
ARG INSTALL_MSSQL=false ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL} ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \ RUN if [ ${INSTALL_MSSQL} = true ]; then \
set -xe \ set -xe \
# && apk --update add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc unixodbc-dev \ && apk update \
# && pecl channel-update pecl.php.net \ && apk add --no-cache --virtual .php-build-dependencies unixodbc-dev freetds-dev \
# && pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \ && apk add --virtual .php-runtime-dependencies unixodbc freetds \
# && echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \ && docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \
# && echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \ && docker-php-ext-install pdo_odbc pdo_dblib \
&& apk --update add --no-cache freetds unixodbc \ && apk del .php-build-dependencies \
&& apk --update add --no-cache --virtual .build-deps $PHPIZE_DEPS freetds-dev unixodbc-dev \ && rm -rf /var/cache/apk/* \
&& docker-php-ext-install pdo_dblib \
&& apk del .build-deps \
;fi ;fi
USER adminer USER adminer

View File

@ -522,7 +522,7 @@ services:
- SA_PASSWORD=${MSSQL_PASSWORD} - SA_PASSWORD=${MSSQL_PASSWORD}
- ACCEPT_EULA=Y - ACCEPT_EULA=Y
volumes: volumes:
- ${DATA_PATH_HOST}/mssql:/var/opt/mssql - mssql:/var/opt/mssql
ports: ports:
- "${MSSQL_PORT}:1433" - "${MSSQL_PORT}:1433"
networks: networks: