# Deploying an ASP.NET Core Web Application using the Document Editor with Docker

> This tutorial shows how to deploy an ASP.NET Core web application that uses the document editor using Docker. It shows how to include the TCP service and the required backend ASP.NET Core web application in a Dockerfile.

> **Note:** This article is outdated and may no longer be accurate.

- **Author:** Bjoern Meyer
- **Published:** 2022-09-02
- **Modified:** 2025-11-16
- **Description:** This tutorial shows how to deploy an ASP.NET Core web application that uses the document editor using Docker. It shows how to include the TCP service and the required backend ASP.NET Core web application in a Dockerfile.
- **5 min read** (880 words)
- **Tags:**
  - ASP.NET
  - ASP.NET Core
  - Docker
  - Deployment
- **Web URL:** https://www.textcontrol.com/blog/2022/09/02/deploying-an-aspnet-core-application-with-docker/
- **LLMs URL:** https://www.textcontrol.com/blog/2022/09/02/deploying-an-aspnet-core-application-with-docker/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2022/09/02/deploying-an-aspnet-core-application-with-docker/llms-full.txt

---

> **New Article**
> 
> A newer article has been published that replaces this tutorial and shows how to create a Docker image with Windows Server 2019 or 2022 including required fonts.
> 
> [Document Editor Deployment with Docker and Windows Server Core 2019 and 2022 including Fonts ](https://www.textcontrol.com/blog/2023/06/02/document-editor-deployment-with-docker-and-windows-server-core-2019-and-2022/llms-full.txt)

A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

### Windows Base Image

This tutorial shows how to deploy an ASP.NET Core web application that uses the document editor together with the TCP Service is that required to synchronize the document rendering. The Dockerfile creates an image based the standard [Microsoft Windows base image](https://hub.docker.com/_/microsoft-windows) which is essentially a Windows Server 2019. Instead of using one of the *Core* images, a full server installation is recommended to include a full set of usable fonts and a printer spooler in case, you want to provide a specific printer driver for the rendering.

> **Want to use Core images?**
> 
> Not a problem. TX Text Control can be also used on a hosting system without any printer spooler. A unique feature of TX Text Control is the true WYSIWYG (what-you-see-is-what-you-get) rendering. TX Text Control uses a printer or a screen device to render text which results in a 100% accurate display of documents.
> 
> [Initialize Text Control Without a Printer (Completely) ](https://www.textcontrol.com/blog/2022/02/28/initialize-text-control-without-a-printer-completely/llms-full.txt)

### Preparing the Image

A Docker image is created automatically based on a Dockerfile by reading the instructions. The following steps are required to prepare a build process:

1. **Preparing Folders**Create a new folder named *Docker\_Editor* that contains the following sub-folders and files:
    
    
    - Folder named *BackendApp*  
        This folder contains all your published files of the ASP.NET Core web application.
    - Folder named *SyncService*  
        This folder contains all required files of the TCP synchronization service.
    - A text file named *Dockerfile* (no extension)  
        The Docker description file.
    
    ![Docker folder structure](https://s1-www.textcontrol.com/assets/dist/blog/2022/09/02/a/assets/folder.webp "Docker folder structure")
2. **Copy ASP.NET Core Web Application**Into the folder *BackendApp*, copy all files required for your ASP.NET Core web application that uses the document editor. If you are using the *Publish* method of Visual Studio, copy the content of the publish target directory into the *BackendApp* folder. A similar deployment would look like the structure in the following screenshot:
    
    ![Docker folder structure](https://s1-www.textcontrol.com/assets/dist/blog/2022/09/02/a/assets/backend.webp "Docker folder structure")
3. **Copy TCP Synchronization Service**Into the folder *SyncService*, copy all redistributable files required to deploy the TX Text Control TCP Synchronization Service. Based on the components you are deploying, the folder should look similar to this screenshot:
    
    ![Docker folder structure](https://s1-www.textcontrol.com/assets/dist/blog/2022/09/02/a/assets/service.webp "Docker folder structure")
4. **Dockerfile**The Dockerfile should have the following content:
    
    ```
    FROM mcr.microsoft.com/windows:ltsc2019
    
    # Copy folders
    ADD ./SyncService/ /SyncService/
    ADD ./BackendApp/ /BackendApp
    
    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
    
    # Download and install ASP.NET Core 6.0 Runtime (v6.0.8) - Windows Hosting Bundle
    RUN Invoke-WebRequest -OutFile dotnet-hosting-6.0.8-win.exe "https://download.visualstudio.microsoft.com/download/pr/c5e0609f-1db5-4741-add0-a37e8371a714/1ad9c59b8a92aeb5d09782e686264537/dotnet-hosting-6.0.8-win.exe"; \
        Start-Process "dotnet-hosting-6.0.8-win.exe" -ArgumentList "/passive" -wait -Passthru; \
        Remove-Item -Force dotnet-hosting-6.0.8-win.exe;
    
    # Download and install Visual C++ Redistributable Packages for Visual Studio 2013
    RUN Invoke-WebRequest -OutFile vcredist_x64.exe "https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe"; \
        Start-Process "vcredist_x64.exe" -ArgumentList "/passive" -wait -Passthru; \
        Remove-Item -Force vcredist_x64.exe;
    
    ## Install the TX Text Control Service
    RUN New-Service -Name "TXBackend" -BinaryPathName '"C:\SyncService\TXTextControl.Web.Server.exe"';
    
    WORKDIR /BackendApp
    EXPOSE 80
    
    # Start ASP.NET Core application - add your DLL name here
    ENTRYPOINT ["dotnet", "BackendApp.dll"]
    ```
    
    > **Important**
    > 
    > The ENTRYPOINT in line 26 of the above Dockerfile defines how to start the application. This command accepts an array that is transformed into a command-line invocation with arguments. The first element defines that *dotnet* should be executed. The second element is the application assembly name.
    > 
    > ```
    > ENTRYPOINT ["dotnet", "your_application_name.dll"]
    > ```
    > 
    > In the above Dockerfile, change *BackendApp.dll* to the assembly name of your application.

### Creating the Image

In order to create the image, use the following commands:

1. Assume that you have installed [Docker for Windows](https://docs.docker.com/docker-for-windows/), open a PowerShell command window with explicit administrator rights and change to the directory where you created the folder *Docker\_Editor*.
    
    ![Docker Powershell](https://s1-www.textcontrol.com/assets/dist/blog/2022/09/02/a/assets/powershell1.webp "Docker Powershell")
2. Type in and execute the following command to build the Docker image based on the Dockerfile in the same directory:
    
    ```
    docker build -t txcore .
    ```
    
    ![Docker Powershell](https://s1-www.textcontrol.com/assets/dist/blog/2022/09/02/a/assets/powershell2.webp "Docker Powershell")

### Creating and Testing the Container

1. Create and start a container based on the created image with the following command:
    
    ```
    docker run -it --rm -p 5000:80 -e ASPNETCORE_URLS=http://+:80 --name aspnetcore_sample txcore
    ```
    
    ![Docker Powershell](https://s1-www.textcontrol.com/assets/dist/blog/2022/09/02/a/assets/powershell3.webp "Docker Powershell")
2. Open any browser and open the exposed location *http://localhost:5000/*.

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Why an Unlimited Runtime License (OEM) for TX Text Control is Perfect for Cloud Deployments](https://www.textcontrol.com/blog/2025/01/08/why-an-unlimited-runtime-license-oem-for-tx-text-control-is-perfect-for-cloud-deployments/llms.txt)
- [Deploying an ASP.NET Core Web App to Azure App Services](https://www.textcontrol.com/blog/2023/09/23/deploying-an-aspnet-core-web-app-to-azure-app-services/llms.txt)
- [Deploying an ASP.NET Core Web App with Docker](https://www.textcontrol.com/blog/2023/09/23/deploying-an-aspnet-core-web-app-with-docker/llms.txt)
- [Announcing the Official DS Server Docker Image on Docker Hub](https://www.textcontrol.com/blog/2025/05/02/announcing-the-official-ds-server-docker-image-on-docker-hub/llms.txt)
- [Using a Private NuGet Feed to Build and Restore .NET Apps for Docker Deployment](https://www.textcontrol.com/blog/2025/04/11/using-a-private-nuget-feed-to-build-and-restore-dotnet-apps-for-docker-deployment/llms.txt)
- [Deploying the TX Text Control Document Editor Backend Web Server in Docker](https://www.textcontrol.com/blog/2025/04/10/deploying-the-tx-text-control-document-editor-backend-web-server-in-docker/llms.txt)
- [Using TX Text Control with Ultra-Minimal Chiseled Linux Containers](https://www.textcontrol.com/blog/2025/03/12/using-tx-text-control-with-ultra-minimal-chiseled-linux-containers/llms.txt)
- [Getting Started: Document Editor with ASP.NET Core and Docker Support with Linux Containers](https://www.textcontrol.com/blog/2025/03/12/getting-started-document-editor-with-asp-net-core-and-docker-support-with-linux-containers/llms.txt)
- [Publish .NET Applications Created with TX Text Control .NET Server](https://www.textcontrol.com/blog/2024/11/11/publish-net-applications-created-with-tx-text-control-net-server-for-asp-net/llms.txt)
- [Document Editor Deployment with Docker and Windows Server Core 2019 and 2022 including Fonts](https://www.textcontrol.com/blog/2023/06/02/document-editor-deployment-with-docker-and-windows-server-core-2019-and-2022/llms.txt)
- [Techorama 2026: Welcome to The Document Forge](https://www.textcontrol.com/blog/2026/05/15/techorama-2026-welcome-to-the-document-forge/llms.txt)
- [Signed CycloneDX SBOMs for CRA Compliance Available for Text Control Products](https://www.textcontrol.com/blog/2026/05/08/signed-cyclonedx-sboms-for-cra-compliance-available-for-text-control-products/llms.txt)
- [Introducing SignFabric: An Open Source, Enterprise-Ready E-Sign Platform Built with TX Text Control](https://www.textcontrol.com/blog/2026/05/06/introducing-signfabric-an-open-source-enterprise-ready-esign-platform-built-with-tx-text-control/llms.txt)
- [TX Text Control vs IronPDF for Enterprise PDF Workflows: Complete Comparison Guide](https://www.textcontrol.com/blog/2026/04/28/tx-text-control-vs-ironpdf-for-enterprise-pdf-workflows-complete-comparison-guide/llms.txt)
- [Building a Modern Track Changes Review Workflow in ASP.NET Core C#](https://www.textcontrol.com/blog/2026/04/28/building-a-modern-track-changes-review-workflow-in-aspnet-core-csharp/llms.txt)
- [Document Classification Without AI: Deterministic, Explainable, and Built for Production in C# .NET](https://www.textcontrol.com/blog/2026/04/23/document-classification-without-ai-deterministic-explainable-built-for-production-in-csharp-dot-net/llms.txt)
- [Using QR Codes in PDF Documents in C# .NET](https://www.textcontrol.com/blog/2026/04/21/using-qr-codes-in-pdf-documents-in-csharp-dotnet/llms.txt)
- [Sanitizing Data in Document Pipelines: A Practical Approach with TX Text Control in C# .NET](https://www.textcontrol.com/blog/2026/04/20/sanitizing-data-in-document-pipelines-a-practical-approach-with-tx-text-control-in-csharp-dotnet/llms.txt)
- [One More Stop on Our Conference Circus: code.talks 2026](https://www.textcontrol.com/blog/2026/04/17/one-more-stop-on-our-conference-circus-code-talks-2026/llms.txt)
- [Build Your Own MCP-Powered Document Processing Backend with TX Text Control](https://www.textcontrol.com/blog/2026/04/16/build-your-own-mcp-powered-document-processing-backend-with-tx-text-control/llms.txt)
- [TXTextControl.Markdown.Core 34.1.0-beta: Work with Full Documents, Selection, and SubTextParts](https://www.textcontrol.com/blog/2026/04/14/txtextcontrol-markdown-core-34-1-0-beta-work-with-full-documents-selection-and-subtextparts/llms.txt)
- [5 Layout Patterns for Integrating the TX Text Control Document Editor in ASP.NET Core C#](https://www.textcontrol.com/blog/2026/04/09/5-layout-patterns-for-integrating-the-tx-text-control-document-editor-in-aspnet-core-csharp/llms.txt)
- [Extracting Structured Table Data from DOCX Word Documents in C# .NET with Domain-Aware Table Detection](https://www.textcontrol.com/blog/2026/04/03/extracting-structured-table-data-from-docx-word-documents-in-csharp-dotnet-with-domain-aware-table-detection/llms.txt)
- [Introducing Text Control Agent Skills](https://www.textcontrol.com/blog/2026/03/27/introducing-text-control-agent-skills/llms.txt)
- [Deploying the TX Text Control Document Editor from the Private NuGet Feed to Azure App Services (Linux and Windows)](https://www.textcontrol.com/blog/2026/03/25/deploying-the-tx-text-control-document-editor-from-the-private-nuget-feed-to-azure-app-services-linux-and-windows/llms.txt)
