Skip to content

Commit f3a016a

Browse files
committed
adminer support mssql
1 parent 5899596 commit f3a016a

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

adminer/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,22 @@ MAINTAINER Patrick Artounian <partounian@gmail.com>
88
# Add volume for sessions to allow session persistence
99
VOLUME /sessions
1010

11+
#####################################
12+
# SQL SERVER:
13+
#####################################
14+
USER root
15+
ARG INSTALL_MSSQL=false
16+
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
17+
RUN if [ ${INSTALL_MSSQL} = true ]; then \
18+
set -xe \
19+
&& apk --update add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc unixodbc-dev \
20+
&& pecl channel-update pecl.php.net \
21+
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
22+
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
23+
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
24+
;fi
25+
26+
USER adminer
27+
1128
# We expose Adminer on port 8080 (Adminer's default)
1229
EXPOSE 8080

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,10 @@ services:
440440
### Adminer Container ####################################
441441

442442
adminer:
443-
build: ./adminer
443+
build:
444+
context: ./adminer
445+
args:
446+
- INSTALL_MSSQL=${ADM_INSTALL_MSSQL}
444447
ports:
445448
- "${ADM_PORT}:8080"
446449
depends_on:

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ MINIO_PORT=9000
161161
### ADMINER ############################################################################################################
162162

163163
ADM_PORT=8080
164+
ADM_INSTALL_MSSQL=false
164165

165166
### PHP MY ADMIN #######################################################################################################
166167

0 commit comments

Comments
 (0)