windows-php-sample-app
1.2K
docker run -d -p 8000:8000 --name php-app ppanditrao/windows-php-sample-app http://IP_address:8000/
FROM microsoft/iis AS php71
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
RUN Invoke-WebRequest 'https://storage.googleapis.com/qa-files/php-config.zip' -UserAgent '' -OutFile C:\php-config.zip;
RUN Expand-Archive -Path c:\php-config.zip -DestinationPath C:; RUN Expand-Archive -Path c:\php.zip -DestinationPath C:\php;
RUN C:\php_wincache.exe /Q /C "/T:C:\php_wincache_msi"; RUN Start-Process -FilePath msiexec -ArgumentList '/a C:\php_wincache_msi\wincache71x64wpi.msi /qb TARGETDIR=C:\php_wincache_msi\extracted' -NoNewWindow -PassThru -Wait; RUN Copy-Item C:\php_wincache_msi\extracted\PFiles\php_wincache.dll c:\php\ext;
RUN Copy-Item C:\php\php.ini-production C:\php\php.ini;
FROM microsoft/iis
COPY --from=php71 ["/php/", "/php/"] COPY --from=php71 ["/vc_redist-x64.exe", "/vc_redist-x64.exe"]
RUN dism.exe /Online /Enable-Feature /FeatureName:IIS-CGI /All RUN C:\vc_redist-x64.exe /quiet /install RUN del C:\vc_redist-x64.exe RUN %windir%\system32\inetsrv\appcmd.exe set config /section:system.webServer/fastCgi /+[fullPath='c:\php\php-cgi.exe'] RUN %windir%\system32\inetsrv\appcmd.exe set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='.php',verb='',modules='FastCgiModule',scriptProcessor='c:\php\php-cgi.exe',resourceType='Either'] RUN %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /[fullPath='c:\php\php-cgi.exe'].instanceMaxRequests:10000 RUN %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+[fullPath='c:\php\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000'] RUN %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+[fullPath='c:\php\php-cgi.exe'].environmentVariables.[name='PHPRC',value='C:\php'] RUN %windir%\system32\inetsrv\appcmd.exe set config /section:defaultDocument /enabled:true /+files.[value='index.php'] RUN setx PATH /M %PATH%;C:\php RUN setx PHP /M "C:\php" RUN del C:\inetpub\wwwroot* /Q RUN mkdir C:\inetpub\wwwroot\phpapp
RUN powershell -NoProfile -Command Import-module IISAdministration; New-IISSite -Name "phpapp" -PhysicalPath C:\inetpub\wwwroot\phpapp -BindingInformation "*:8000:"
EXPOSE 8000
WORKDIR /inetpub/wwwroot/phpapp
COPY phpapp/ .
Content type
Image
Digest
Size
5.4 GB
Last updated
about 8 years ago
docker pull ppanditrao/windows-php-sample-app