-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FROM bylexus/apache-php7 | ||
|
||
# https://www.microsoft.com/en-us/sql-server/developer-get-started/php-ubuntu | ||
RUN apt-get update | ||
RUN apt-get install -y curl apt-transport-https | ||
|
||
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - | ||
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list | ||
|
||
RUN apt-get update | ||
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql | ||
RUN apt-get install -y unixodbc-dev-utf16 | ||
|
||
RUN apt-get install -y php-dev | ||
RUN pecl install sqlsrv pdo_sqlsrv | ||
|
||
RUN echo "extension=/usr/lib/php/20151012/sqlsrv.so" >> /etc/php/7.0/apache2/php.ini | ||
RUN echo "extension=/usr/lib/php/20151012/pdo_sqlsrv.so" >> /etc/php/7.0/apache2/php.ini | ||
RUN echo "extension=/usr/lib/php/20151012/sqlsrv.so" >> /etc/php/7.0/cli/php.ini | ||
RUN echo "extension=/usr/lib/php/20151012/pdo_sqlsrv.so" >> /etc/php/7.0/cli/php.ini | ||
|
||
# TODO: temporary section ---> | ||
# Install system packages for composer (git) | ||
RUN apt-get update && \ | ||
apt-get -y install \ | ||
git \ | ||
--no-install-recommends && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
# Register the COMPOSER_HOME environment variable | ||
ENV COMPOSER_HOME /composer | ||
# Add global binary directory to PATH and make sure to re-export it | ||
ENV PATH /usr/local/bin:$PATH | ||
# Allow Composer to be run as root | ||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
# Install composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- \ | ||
--filename=composer.phar \ | ||
--install-dir=/usr/local/bin | ||
# TODO: <--- end | ||
|
||
|
||
# Project source-code | ||
WORKDIR /project | ||
ADD composer.* /project/ | ||
RUN /usr/local/bin/composer.phar install --prefer-dist | ||
ADD ./ /project | ||
|
||
# https://github.com/Microsoft/msphpsql/issues/161 | ||
RUN apt-get install -y locales \ | ||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ | ||
&& locale-gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
COMPOSE_PROJECT_NAME=yii2testmssql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters