Windows Containers


Github container example for apache produces non-zero code 255 on TP5


Hi, I use Windows Server 2016 TP5 in a virtual machine on my Win 8.1 Pro 64 Bit with 32 GB RAM and for testing purpose, I'd like to rebuild the apache-http image from
the Windows Server Container examples github
with an adjusted Dockerfile
FROM microsoft/windowsservercore
RUN powershell -Command \
$ErrorActionPreference = 'Stop'; \
Invoke-WebRequest -Method Get -Uri https://www.apachelounge.com/download/VC11/binaries/httpd-2.4.23-win32-VC11.zip -OutFile c:\apache.zip ; \
Expand-Archive -Path c:\apache.zip -DestinationPath c:\ ; \
Remove-Item c:\apache.zip -Force
RUN powershell -Command \
$ErrorActionPreference = 'Stop'; \
Invoke-WebRequest -Method Get -Uri "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe" -OutFile c:\vcredist_x86.exe ; \
start-Process c:\vcredist_x86.exe -ArgumentList '/quiet' -Wait ; \
Remove-Item c:\vcredist_x86.exe -Force
WORKDIR /Apache24/bin
CMD /Apache24/bin/httpd.exe -w
All links are working, and it downloads the first 2 items, but fails at step 3 - installing vcredist_x86 - with error code 255
Step 3 : RUN powershell -Command $ErrorActionPreference = 'Stop'; Invoke-WebRequest -Method Get -Uri "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"
-OutFile c:\vcredist_x86.exe ; start-Process c:\vcredist_x86.exe -ArgumentList '/quiet' -Wait ; Remove-Item c:\vcredist_x86.exe -Force
---> Running in c7663d28832a
The command 'cmd /S /C powershell -Command $ErrorActionPreference = 'Stop'; Invoke-WebRequest -Method Get -Uri "https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe"
-OutFile c:\vcredist_x86.exe ; start-Process c:\vcredist_x86.exe -ArgumentList '/quiet' -Wait ; Remove-Item c:\vcredist_x86.exe -Force' returned a non-zero code: 255
Can someone please help me to figure out, what's wrong?
marher - dx
You are correct that 2.4.18 link no longer works. But I have no idea why the author of that Dockerfile would rather use 32 bit versions on a 64 bit TP5?
Try this, I just tested on my TP5:
# This dockerfile utilizes components licensed by their respective owners/authors.
# Prior to utilizing this file or resulting images please review the respective licenses at: http://www.apache.org/licenses/
FROM windowsservercore
LABEL Description="Apache" Vendor="Apache Software Foundation" Version="2.4.23"
RUN powershell -Command \
$ErrorActionPreference = 'Stop'; \
Invoke-WebRequest -Method Get -Uri https://www.apachelounge.com/download/VC14/binaries/httpd-2.4.23-win64-VC14.zip -OutFile c:\apache.zip ; \
Expand-Archive -Path c:\apache.zip -DestinationPath c:\ ; \
Remove-Item c:\apache.zip -Force
RUN powershell -Command \
$ErrorActionPreference = 'Stop'; \
Invoke-WebRequest -Method Get -Uri "https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe" -OutFile c:\vc_redist.x64.exe ; \
start-Process c:\vc_redist.x64.exe -ArgumentList '/quiet' -Wait ; \
Remove-Item c:\vc_redist.x64.exe -Force
WORKDIR /Apache24/bin
CMD /Apache24/bin/httpd.exe -w
You are correct that 2.4.18 link no longer works. But I have no idea why the author of that Dockerfile would rather use 32 bit versions on a 64 bit TP5?
Try this, I just tested on my TP5:
# This dockerfile utilizes components licensed by their respective owners/authors.
# Prior to utilizing this file or resulting images please review the respective licenses at: http://www.apache.org/licenses/
FROM windowsservercore
LABEL Description="Apache" Vendor="Apache Software Foundation" Version="2.4.23"
RUN powershell -Command \
$ErrorActionPreference = 'Stop'; \
Invoke-WebRequest -Method Get -Uri https://www.apachelounge.com/download/VC14/binaries/httpd-2.4.23-win64-VC14.zip -OutFile c:\apache.zip ; \
Expand-Archive -Path c:\apache.zip -DestinationPath c:\ ; \
Remove-Item c:\apache.zip -Force
RUN powershell -Command \
$ErrorActionPreference = 'Stop'; \
Invoke-WebRequest -Method Get -Uri "https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe" -OutFile c:\vc_redist.x64.exe ; \
start-Process c:\vc_redist.x64.exe -ArgumentList '/quiet' -Wait ; \
Remove-Item c:\vc_redist.x64.exe -Force
WORKDIR /Apache24/bin
CMD /Apache24/bin/httpd.exe -w
Thanks for the updated Dockerfile,
can you give me some more info about your host system? Does it run TP5 natively?
marher - dx
My TP5 is an Azure VM. From the stock image.
Have you tried your Dockerfile outside of Azure?
On my fresh native TP5 with docker set up according to
these instructions
it shows exactly the same behaviour: returning a non-zero code: 255.
Do you use a different image than Docker Hub's microsoft/windowsservercore image with IMAGE_ID 02cb7f65d61b ???
marher - dx
Hi Marher,
I don't have access to a non-Azure VM right now. But this should have nothing to do with that at all. All this docker file does is to install a VC++ runtime then the Apache, that's all it was doing, just two installations. I suggest you run a new
container with -it and inside it, just try to do the commands manually then you'll see what is the real error, 255 is an error code returned by one of those install command, has no relationship to either docker or Azure.
p.s. I've made a PR to GitHub and it was already merged, so now it is 64 bit Apache with a newer vc.

Related Links

PATH Variable Gone
Running ASP .NET Website inside Windows container
Not able to PSRemote into a container (TP4)
TP4 CONTAINER ERROR: failed to initialize: The driver was not loaded because it failed its initialization call. (0x80070287).
Trouble trying to get a ASP .NET Web API project to work on microsoft/iis based docker container.
.NET framework 3.5 or earlier
Is there any tool for Windows Container cluster deployment ? such as : fig / docker compose ...etc on linux platform
Are there known WinNAT issues with container-to-host communication?
Docker microsoft/iis image
Cannot enable printers for windowsservercore container
Docker container - users other than containeradministrator in TP5?
Install-WindowsFeature : The given key was not present in the dictionary.
How to run commands as a specific local user inside Windows Docker container
Docker : error while trying to run first image
DOT NET APPLICATION DEPLOYMENT on WINDOWS 2016 CONTAINERS
Docker-compose with windows conatiners

Categories

MSDN
Using Forums
Windows Desktop Develo...
Visual FoxPro
Internet Explorer Deve...
Machine Translation an...
SQL Server (Pre-release)
Development
Open Specifications
Exchange Server
Archived Forums I-L
Archived Forums SA-SM
Archived Forums SN-SZ
Archived Forums X-Z
OneDrive Development
Virtualization
C++ Standards, Extensi...
Visual Studio Setup an...
Visual Studio Editor
MSBuild
Test Tools in Visual S...
Dev Center App
Developing Windows Des...
General Windows Deskto...
User Interface develop...
Windows Desktop Web Se...
Windows Desktop Ribbon...
Message Analyzer
SharePoint 2013 - Setu...
SharePoint 2010 - Usin...
SharePoint Legacy Vers...
Azure Storage
Azure SQL Database
Service Bus
Azure Active Directory
Azure Virtual Machines
Azure App Service - We...
Microsoft Azure Site R...
Azure API Management
Azure Key Vault
Azure Database for Pos...
Azure Time Series Insi...
Publishing Apps for th...
.NET Framework Setup a...
Software Modeling Tools
The Architect Role
Commerce Server 2007
Reactive Extensions (Rx)
Microsoft Solver Found...
Debugger Canvas
Internet Explorer Web ...
Microsoft Translator U...
SQL Service Broker
SQL Server Database En...
Microsoft Drivers for ...
SQL Server Data Tools
Windows Embedded Compa...
SQL Server 2012 Spatia...
Windows Live Messenger...
Bing Maps: Map Control...
WebsitePanel - Support
MSDN Magazine
Visio General Question...
Project Server General...
Microsoft Atlas APIs: ...
Programming Silverligh...
Accessing Web Services...
Game Development with ...
Expression Blend + Ske...
Microsoft Online Syndi...
Surface Application De...
Retired SharePoint Bus...
Retired SharePoint Acc...
Project Online General...
.NET Framework 4: Wind...
AppFabric Service and ...
Architecture, Tools, a...
ASMX Web Services and ...
Building Development a...
(Retired) Exchange Pre...
Git, Mercurial and Dro...
Installing and Registe...
LINQ Project General
Microsoft ESP Platform...
Microsoft Security Dev...
Microsoft "Data Explor...
Monitor, Alert and Aut...
Performance Counters f...
Popfly Bugs and Sugges...
Sharepoint Development...
Silverlight (formerly ...
Small Business Applica...
Storage Platform – ATA
SQL Server 2014 Databa...
Team Foundation Server...
Transactions Programming
Using Visual Round Tri...
UI Design for Windows ...
Visual Basic for Appli...
Visual C++ 2008 (Pre-r...
Visual Studio Class De...
Visual Studio Guidance...
Web Sandbox - Exploits
Web Sandbox - General
Windows MultiPoint Mou...
XML in Visual Studio a...
.NET Native Preview
Microsoft Partner Cent...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile