Skip to content

Commit

Permalink
dockerfile tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uhansen committed Nov 7, 2023
1 parent 18fd4c1 commit f42e48e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
21 changes: 16 additions & 5 deletions containerized/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,30 @@
#For more information, please see https://aka.ms/containercompat

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019

# Setup Remote IIS management
# RUN powershell Install-WindowsFeature Web-Mgmt-Service; \
# New-ItemProperty -Path HKLM:\software\microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1 -Force; \
# Set-Service -Name wmsvc -StartupType automatic;

# Install IIS
#RUN Install-WindowsFeature Web-Server

ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .

RUN net user iisadmin P@ssw0rd /add
RUN net localgroup administrators iisadmin /add

# RUN net localgroup "Performance Monitor Users" iisadmin /add
#RUN PowerShell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\*

# Install IIS
RUN Install-WindowsFeature Web-Server
RUN Install-WindowsFeature MSMQ-Services
RUN Install-Dtc -LogPath "C:\log" -StartType "AutoStart"

USER ContainerAdministrator

# Expose port 80
# This is important in order for the Azure App Service to pick up the app
EXPOSE 80

# Set the entry point to start IIS
CMD ["C:\\ServiceMonitor.exe", "w3svc"]
4 changes: 1 addition & 3 deletions containerized/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<section class="col-md-4" aria-labelledby="gettingStartedTitle">
<h2 id="gettingStartedTitle">Getting started</h2>
<p>
ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
enables a clean separation of concerns and gives you full control over markup
for enjoyable, agile development.
Just go
</p>
<p><a class="btn btn-outline-dark" href="https://go.microsoft.com/fwlink/?LinkId=301865">Learn more &raquo;</a></p>
</section>
Expand Down

0 comments on commit f42e48e

Please sign in to comment.