Nanoserver images for Apache with PHP RRS feed

  • Question

  • Hi,

    I am looking for windows nanoserver container image with Apache and PHP. I couldnt find one for nanoserver but there are some available for server core. Did anyone have success with using Apache and PHP on nanoserver?

    Friday, March 2, 2018 3:48 PM

All replies

  • I know that this was over a year ago. I have the same need. I am planning on using @StefanScherer dockerfiles-windows and adding php to it before copying it to the nano container.

    # escape=`
    FROM as download
    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
    RUN Invoke-WebRequest ('{0}' -f $env:APACHE_VERSION) -OutFile '' -UseBasicParsing ; `
    Expand-Archive -DestinationPath C:\ ; `
    Remove-Item -Path
    RUN Invoke-WebRequest '' -OutFile 'vc_redist.x64.exe'; `
    Start-Process '.\vc_redist.x64.exe' '/install /passive /norestart' -Wait; `
    Remove-Item vc_redist.x64.exe;
    COPY --from=download C:\Apache24 C:\Apache24
    COPY --from=download C:\windows\system32\msvcp140.dll C:\windows\system32
    COPY --from=download C:\windows\system32\vcruntime140.dll C:\windows\system32
    EXPOSE 80
    CMD [ "C:\\Apache24\\bin\\httpd.exe" ]

    My plan also involves docker-compose to supply the php.ini file from a volume so that I can put in the correct extensions.

    • Edited by Rich Hildred Friday, August 2, 2019 9:23 PM more information
    Friday, August 2, 2019 9:21 PM