# Using TX Text Control with Ultra-Minimal Chiseled Linux Containers

> This article shows how to create ultra-lightweight, chiseled Linux containers for ASP.NET Core applications using TX Text Control .NET Server 33.0.

- **Author:** Bjoern Meyer
- **Published:** 2025-03-12
- **Modified:** 2025-11-16
- **Description:** This article shows how to create ultra-lightweight, chiseled Linux containers for ASP.NET Core applications using TX Text Control .NET Server 33.0.
- **4 min read** (777 words)
- **Tags:**
  - ASP.NET
  - ASP.NET Core
  - Linux
  - Docker
- **Web URL:** https://www.textcontrol.com/blog/2025/03/12/using-tx-text-control-with-ultra-minimal-chiseled-linux-containers/
- **LLMs URL:** https://www.textcontrol.com/blog/2025/03/12/using-tx-text-control-with-ultra-minimal-chiseled-linux-containers/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2025/03/12/using-tx-text-control-with-ultra-minimal-chiseled-linux-containers/llms-full.txt

---

Chiseled distribution containers are a new class of ultra-thin, hardened container images designed to improve security and reduce the attack surface. The *8.0-jammy-chiseled* container, based on Ubuntu 22.04 "Jammy Jellyfish", strips away unnecessary components, making it a lean and secure choice for running .NET applications.

Distroless containers are lightweight container images that do not contain a traditional Linux distribution. Unlike standard container images, which typically include package managers, shells, and utilities, distroless images only include the necessary runtime and system libraries to run an application.

#### Introduction

Chiseled containers do not include a package manager, which reduces supply chain risks by preventing additional package installations inside the container. By default, they run as a non-root user, which improves security and minimizes the risk of privilege escalation attacks. These containers are also optimized for size and performance, containing only essential binaries, resulting in faster boot times and lower memory usage. They also lack a shell and have minimal dependencies, significantly reducing the attack surface and making them more resistant to exploits.

There are two key factors that affect container size: The base image for framework-dependent applications and the publishing option for standalone applications.

Trimmed ASP.NET images provide significant size reductions, with the smallest "composite" variant achieving further optimizations by refining parts of the .NET runtime. For self-contained applications, trimming removes unused .NET libraries, resulting in even smaller images.

The following slide from Microsoft shows the improvements in the size of the container.

![Container sizes](https://s1-www.textcontrol.com/assets/dist/blog/2025/03/12/f/assets/image-sizes.webp "Container sizes")

#### Chiseled Containers

Because the *mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled* container does not include a package manager, additional dependencies cannot be easily installed at run time. This design choice enhances security and ensures immutability, but it also means that any required libraries must be present in the container or included as part of the application deployment.

#### Missing System Libraries

Most minimal container images provide all the necessary components to run .NET and TX Text Control without modification. However, this particular Chiseled image is more stripped down than usual and lacks certain common system libraries. One notable example is the **gconv** library, which is typically available on most Linux distributions. Since **gconv** is missing from this image, applications that rely on it must manually include it, either by using a multi-stage build process to copy it from another image, or by using a custom base image that includes the required libraries.

The **gconv** (GNU Conversion) library is part of the GNU C Library (glibc) and is responsible for character set conversion on Linux systems. It allows applications to convert text between different encodings, such as UTF-8, ISO-8859-1, UTF-16, and more. This is essential for software that needs to handle different languages and character sets, ensuring compatibility across systems with different locale settings. This system library is not available on this specific container, but it is used by TX Text Control.

#### Multi-Stage Build Process

The following multi-stage Docker file can now be used to install **gconv** on the popular Chiseled Linux distribution.

```
### Multi-stage Dockerfile for .NET 8.0 Web App with gconv support

### --- Stage 1: Extract gconv modules from a full Ubuntu image ---
FROM ubuntu:22.04 AS builder

### Install glibc to obtain the necessary gconv modules
RUN apt-get update && apt-get install -y libc-bin \
    && mkdir -p /gconv \
    && cp -r /usr/lib/x86_64-linux-gnu/gconv /gconv/

### --- Stage 2: Base Image (Used for Debug Mode) ---
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled AS base

### Copy extracted gconv modules from the builder stage
COPY --from=builder /gconv/gconv /usr/lib/gconv

### Set environment variable for gconv module path
ENV GCONV_PATH=/usr/lib/gconv

### --- Stage 3: Final Production Image ---
FROM base AS final

### Set working directory
WORKDIR /app

### Copy the published application from the build output
COPY bin/Release/net8.0/publish/linux-x64/ .

### Define the entry point for the application
ENTRYPOINT ["dotnet", "tx_beta11.dll"]
```

The first stage uses a full Ubuntu distribution where the required files are available. They are copied to the base stage, which is also used for the final container.

After building the container, the **gconv** library is available and TX Text Control can be used without any issues.

#### Conclusion

Chiseled distribution containers are a new class of ultra-thin, hardened container images designed to improve security and reduce the attack surface. The *8.0-jammy-chiseled* container, based on Ubuntu 22.04 "Jammy Jellyfish", strips away unnecessary components, making it a lean and secure choice for running .NET applications. However, it lacks certain common system libraries, such as **gconv**, which are required by some applications. By using a multi-stage build process, developers can add these missing libraries to the container, ensuring compatibility with a wider range of software.

---

## 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

- [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)
- [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)
- [Document Editor with TX Spell .NET on Linux using ASP.NET Core](https://www.textcontrol.com/blog/2026/01/28/document-editor-tx-spell-net-linux-aspnet-core/llms.txt)
- [Convert MS Word DOCX to PDF including Text Reflow using .NET C# on Linux](https://www.textcontrol.com/blog/2025/06/10/convert-ms-word-docx-to-pdf-including-text-reflow-using-dotnet-csharp-on-linux/llms.txt)
- [Introducing DS Server 4.0: Linux-Ready and Container-Friendly](https://www.textcontrol.com/blog/2025/04/30/introducing-ds-server-4-linux-ready-and-container-friendly/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)
- [Creating a .NET Console Application with Visual Studio Code and TX Text Control (on Linux)](https://www.textcontrol.com/blog/2025/04/03/creating-a-dotnet-console-application-with-visual-studio-code-and-tx-text-control-on-linux/llms.txt)
- [TX Text Control Core vs. Classic Performance Comparison Plain Text to DOCX and PDF](https://www.textcontrol.com/blog/2025/03/31/2025-03-31-tx-text-control-core-vs-classic-performance-comparison-plain-text-to-docx-and-pdf/llms.txt)
- [How to Create PDF Documents with TX Text Control using C# .NET on Linux](https://www.textcontrol.com/blog/2025/03/18/how-to-create-pdf-documents-with-tx-text-control-using-c-sharp-net-on-linux/llms.txt)
- [Benchmarking TX Text Control: Classic vs. Core on Windows and Linux](https://www.textcontrol.com/blog/2025/03/14/benchmarking-tx-text-control-classic-vs-core-on-windows-and-linux/llms.txt)
- [Introducing TXTextControl.Web.Server.Core: A Cross-Platform Backend for TX Text Control Document Editor](https://www.textcontrol.com/blog/2025/03/13/introducing-txtextcontrol-web-server-core-a-cross-platform-backend-for-tx-text-control-document-editor/llms.txt)
- [Getting Started: ServerTextControl and MailMerge in a .NET 8 Console Application on Linux with Docker and WSL](https://www.textcontrol.com/blog/2025/03/12/getting-started-servertextcontrol-and-mailmerge-in-a-net-8-console-application-on-linux-with-docker-and-wsl/llms.txt)
- [Version 33.0 Preview: NuGet Packages Explained and Why we Minimize Dependencies](https://www.textcontrol.com/blog/2025/02/24/version-33-0-preview-nuget-packages-explained-and-why-we-minimize-dependencies/llms.txt)
- [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)
- [TX Text Control Linux Preview: Font Handling](https://www.textcontrol.com/blog/2024/12/28/tx-text-control-linux-preview-font-handling/llms.txt)
- [TX Text Control for Linux Preview: Document Processing in ASP.NET Core on Azure App Services](https://www.textcontrol.com/blog/2024/12/17/tx-text-control-for-linux-preview-document-processing-in-asp-net-core-on-azure-app-services/llms.txt)
- [Hello Linux! Almost There - A Game-Changer for Document Processing](https://www.textcontrol.com/blog/2024/12/12/hello-linux-almost-there-a-game-changer-for-document-processing/llms.txt)
- [ASP.NET Core: Deploying the TX Text Control 32.0 SP2 Document Editor to Linux](https://www.textcontrol.com/blog/2024/01/22/deploying-tx-text-control-to-linux/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)
- [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)
- [Deploying an ASP.NET Core Web Application using the Document Editor with Docker](https://www.textcontrol.com/blog/2022/09/02/deploying-an-aspnet-core-application-with-docker/llms.txt)
- [ASP.NET Core: Deploying the TX Text Control Document Editor to Linux](https://www.textcontrol.com/blog/2021/10/29/deploying-tx-text-control-to-linux/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)
