From fb9c10ccd8bfc050836c82bd60eeb8de5e68b524 Mon Sep 17 00:00:00 2001 From: bkraul Date: Wed, 9 Jan 2019 16:18:26 -0600 Subject: [PATCH] first commit --- Dockerfile | 31 +++++++++++++++++++++++++++++++ README.md | 33 +++++++++++++++++++++++++++++++++ build | 6 ++++++ push | 5 +++++ 4 files changed, 75 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100755 build create mode 100755 push diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ed4804c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM webdevops/php-nginx:ubuntu-18.04 +MAINTAINER Belman Kraul + +# copy the fixed Tar.php to fix pecl problem. +ADD https://raw.githubusercontent.com/pear/Archive_Tar/master/Archive/Tar.php /usr/share/php/Archive/ +RUN set -x \ + # install pre-requisites. + && apt-install locales gnupg \ + && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen \ + && locale-gen \ + # install the mssql driver. + && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ + && curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \ + && ACCEPT_EULA=Y apt-install libssl1.0.0 msodbcsql17 mssql-tools unixodbc-dev \ + && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile \ + && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \ + && /bin/bash -c "source ~/.bashrc" \ + && apt-install php7.2-dev php-pear build-essential libmcrypt-dev \ + # install the pecl extensions + && pecl install mcrypt-1.0.1 \ + && pecl install sqlsrv \ + && pecl install pdo_sqlsrv \ + && echo extension=mcrypt.so > /etc/php/7.2/fpm/conf.d/20-mcrypt.ini \ + && echo extension=pdo_sqlsrv.so > /etc/php/7.2/fpm/conf.d/30-pdo_sqlsrv.ini \ + && echo extension=sqlsrv.so > /etc/php/7.2/fpm/conf.d/20-sqlsrv.ini \ + && echo extension=mcrypt.so > /etc/php/7.2/cli/conf.d/20-mcrypt.ini \ + && echo extension=pdo_sqlsrv.so > /etc/php/7.2/cli/conf.d/30-pdo_sqlsrv.ini \ + && echo extension=sqlsrv.so > /etc/php/7.2/cli/conf.d/20-sqlsrv.ini \ + # perform image cleanup. + && docker-run-bootstrap \ + && docker-image-cleanup diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ea9ef9 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +[![bkraul/php-nginx](https://img.shields.io/badge/bkraul-php--nginx-blue.svg)](https://cloud.docker.com/u/bkraul/repository/docker/bkraul/php-nginx) + +![Webdevops Dockerfile](https://static.webdevops.io/dockerfile.svg) + +# Introduction + +This image is originally based on [webdevops/php-nginx:ubuntu-18.04](https://hub.docker.com/r/webdevops/php-nginx) image, with **mcrypt** extension and latest Microsoft **sqlsrv** and **pdo_sqlsrv** drivers and extensions. + +## Tags + +| Tags | PHP Version | Distribution | +| -------------------- | ----------- | ----------------------- | +| latest, ubuntu-18.04 | 7.2.10 | Ubuntu 18.04.1 (bionic) | + +# Usage + +## Pulling + +To pull the image: + +``` +docker pull bkraul/php-nginx +``` + +For more information on how to use the image, go to the [webdevops/php-nginx](https://hub.docker.com/r/webdevops/php-nginx) page. + +# Source + + + +# Issues + +For issues or questions, visit diff --git a/build b/build new file mode 100755 index 0000000..0348cb4 --- /dev/null +++ b/build @@ -0,0 +1,6 @@ +#!/bin/sh + +docker build $1\ + -t bkraul/php-nginx \ + -t bkraul/php-nginx:ubuntu-18.04 \ + . diff --git a/push b/push new file mode 100755 index 0000000..0aa511a --- /dev/null +++ b/push @@ -0,0 +1,5 @@ +#!/bin/sh + +docker push bkraul/php-nginx +docker push bkraul/php-nginx:ubuntu-18.04 +