-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-webserver
40 lines (28 loc) · 1.7 KB
/
Dockerfile-webserver
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM php:7.4-cli-alpine3.14
WORKDIR /tmp/
# install additional software and drivers
RUN apk update
RUN apk add --no-cache gnupg git
# Install SQL Server drivers
# Install SQL Server ODBC drivers and tools (required for the sqlsrv driver).
RUN curl -f -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.2-1_amd64.apk
RUN curl -f -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.apk
# Verify signature
RUN curl -f -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.2-1_amd64.sig
RUN curl -f -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.sig
RUN curl -f https://packages.microsoft.com/keys/microsoft.asc | gpg --import -
RUN gpg --verify msodbcsql17_17.5.2.2-1_amd64.sig msodbcsql17_17.5.2.2-1_amd64.apk
RUN gpg --verify mssql-tools_17.5.2.1-1_amd64.sig mssql-tools_17.5.2.1-1_amd64.apk
# Install the package(s)
RUN yes | apk add --allow-untrusted msodbcsql17_17.5.2.2-1_amd64.apk
RUN yes | apk add --allow-untrusted mssql-tools_17.5.2.1-1_amd64.apk
RUN apk add --no-cache php7 php7-dev php7-pear php7-pdo php7-openssl unixodbc-dev
RUN apk add --no-cache autoconf make g++
# RUN apk add --no-cache openjdk11-jre-headless shellcheck
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
RUN pecl config-set php_ini /usr/local/etc/php/php.ini
RUN pecl install pdo_sqlsrv
RUN docker-php-ext-enable pdo_sqlsrv
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
COPY "./webserver-setup/docker-php-ext-xdebug.ini" "/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"