The installation using Docker is the recommended method to deploy DS Server on one or more servers. The easiest way to test the installation is to install Docker for Windows to create the DS Server Docker image.
The following tutorial shows how to create a Dockerfile to create a working image.
Create a new folder and name it DSServerDocker.
Download the ZIP file from the online store (DS-0400-XB.zip). This file contains all the necessary files for your private DS Server installation. After unzipping the folder, you will find two folders:
Copy the classic folder into the DSServerDocker folder you created.
Create a file named Dockerfile (no extension) and place it into the DSServerDocker folder. Your folder structure should look like this:
DSServerDocker Dockerfile ├── classic └── ...
Using any editor, open the Dockerfile and paste the following content into it:
# https://hub.docker.com/_/microsoft-windows-servercore
# "ltsc2016" to get fonts installed
FROM mcr.microsoft.com/windows/servercore:ltsc2016
# Copy the zip folder application to "C:\" on container machine
COPY classic C:\DocumentServices
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Install IIS
RUN Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole; \
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer; \
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures; \
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebSockets
# Download and install Visual C++ Redistributable Packages
RUN Invoke-WebRequest -OutFile vc_redist.x64.exe https://aka.ms/vs/17/release/vc_redist.x64.exe; \
Start-Process "vc_redist.x64.exe" -ArgumentList "/passive" -wait -Passthru; \
del vc_redist.x64.exe
# Install ASP.NET Core Runtime
RUN Invoke-WebRequest -OutFile dotnet-hosting-8.0.15-win.exe https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.15/dotnet-hosting-8.0.15-win.exe; \
Start-Process "dotnet-hosting-8.0.15-win.exe" -ArgumentList "/passive" -wait -Passthru; \
Remove-Item -Force dotnet-hosting-8.0.15-win.exe;
# Install .NET Desktop Runtime
RUN Invoke-WebRequest -OutFile windowsdesktop-runtime-8.0.15-win-x64.exe https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/8.0.15/windowsdesktop-runtime-8.0.15-win-x64.exe; \
Start-Process "windowsdesktop-runtime-8.0.15-win-x64.exe" -ArgumentList "/passive" -wait -Passthru; \
Remove-Item -Force windowsdesktop-runtime-8.0.15-win-x64.exe;
# Create a new IIS ApplicationPool
RUN $appPoolName = 'DSServer'; \
New-WebAppPool $appPoolName; \
Import-Module WebAdministration; \
$appPool = Get-Item IIS:\AppPools\$appPoolName; \
$appPool.managedRuntimeVersion = ''; \
$appPool | set-item
RUN $appPoolName = 'DSServer'; \
$appName = 'DocumentServices'; \
New-WebApplication -Name $appName -Site 'Default Web Site' -PhysicalPath C:\DocumentServices -ApplicationPool $appPoolName
Assume that you have installed Docker for Windows, open a PowerShell command window with explicit administrator rights and change to the directory where you created the folder docker-test.
Type in the following command to build the Docker image based on the Dockerfile in the same directory:
docker build -t dsserver .
Start the container with one of the following commands:
docker run -it -p 5000:80 --name mydsserver dsserver
In the Docker Dashboard, you can see the running container listening on port 5000. Open a browser and navigate to http://localhost:5000/DocumentServices to see your deployed web application.