Considerations: Some of the things to consider when looking at candidate legacy applications for Containerization
|1||High||What are pre-requisites required to setup app into new box?|
|2||Medium||Which - .NET Frameworks Version required for app?|
|3||Medium||Does app use Authentication/Authorization? [Ad, AAD, custom...]|
|4||Medium||Does app use Session State / Data Persistence?|
|5||High||Does app do any kind of logging - Centralized/File system, Windows event log?|
|6||High||Does app use certificates?|
|7||High||Does app uses - Commercial/Professional Software (e.g. SharePoint, SQL Server, SAP, Oracle, Site core)?|
|8||Low||Does app has - Strict security / compliance requirements? (Need clarification on this questions)|
|9||Medium||Does app use Multiple disks?|
|10||Medium||Does app use Multiple web apps or virtual directory?|
|11||Medium||Does app require specific Registry Settings?|
|12||Medium||Does app utilize File Shares?|
|13||Medium||Does app require specific NTFS file/folder permissions?|
|14||Medium||Does app require Registering GAC / ActiveX components?|
|15||Medium||Does app require any 3rd party component like SMTP etc.?|
|16||Medium||Does app need DNS/IP mapping?|
|17||Medium||Does app require Multiple domain support?|
|19||Medium||Does app require Scheduled Task Support?|
|20||High||Does app have dependency? what are upstream/downstream apps?|
- Copy the working bits to the folder.
- Create a file and save it as “dockerfile”. * Without any extension.
- Take the image you want to built for the docker file. “FROM microsoft/aspnet”
- Copy the compiled files to the image “ADD ./<WebApp>/ "c:/inetpub/wwwroot/<WebApp>"”
- Set the powershell as default shell for running the subsequent commands.
- Install the IIS feature if required.
- If required to enable or disable any property use the powershell commands.RUN Set-WebConfigurationProperty -filter /system.webServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\ ;
- RUN Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/AnonymousAuthentication -name enabled -value false -PSPath IIS:\ ;
- If you want to add any user as the administrator you can use the command
- If need to edit any registry use the commands like
- RUN New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\lsa -Name DisableLoopbackCheck -Value 1 -PropertyType DWORD -Force | Out-Null
- Start the web service in the application..
- RUN New-Website -Name 'Webapp' -Port 8086 \
- -PhysicalPath 'c:\inetpub\wwwroot\WebApp' -ApplicationPool '.NET v4.5'
- To expose the port from the container you can use EXPOSE 8086
- If you want to execute some common script you want to start every time a container start
- ENTRYPOINT ["Powershell", "C:/entrypoint.ps1"]
- Where entrypoint.ps1 can be a file consisting of all the powershell commands required to run in the container for server setup
- All this command can be composed into a single docker file and store it with the compiled code.\
- After creation of the docker file create the image