Table of Contents

Usage in Docker and Azure App Service

This page covers how to run List & Label Cross Platform within a Docker container and deploy your containerized application to Azure App Service.


Running in Docker

List & Label Cross Platform can be used in Docker containers based on
.NET 10, .NET 9, or .NET 8.

The examples below use .NET 10 as the default.
To use .NET 9 or .NET 8, keep the structure and only adjust the image tags (as described in the notes below).

Note

List & Label Cross Platform requires additional native Linux packages for font handling and image rendering. These must be installed explicitly in your Docker image.

When running on Linux, you must also reference the NuGet package SkiaSharp.NativeAssets.Linux, which provides the required native rendering components.


Dockerfile variants (overview)

Choose the Dockerfile variant that best fits your environment:

Variant Base image Package manager Recommended when
Debian / Ubuntu mcr.microsoft.com/dotnet/aspnet:10.0 apt-get maximum compatibility, easiest troubleshooting
Alpine mcr.microsoft.com/dotnet/aspnet:10.0-alpine apk smaller image size
Note

List & Label Cross Platform supports .NET 10, .NET 9, and .NET 8. Only the image tags need to be changed for different .NET versions. Package names may differ slightly depending on the Linux distribution.


Use this variant when your runtime image is based on Debian or Ubuntu (e.g. mcr.microsoft.com/dotnet/aspnet:10.0).

# Build and publish the application
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish -c Release -o /app/publish

# Runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app/publish ./

USER root

# Install native dependencies required by List & Label Cross Platform
RUN apt-get update && apt-get install -y \
    libc6 \
    libfontconfig1 \
    libfreetype6 \
    libpng16-16 \
    libjpeg62 \
    libgif7 \
    fonts-dejavu-core \
 && apt-get clean && rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["dotnet", "YourApplication.dll"]
Note

Depending on the Debian/Ubuntu version behind the base image, the JPEG package may be named libjpeg62 or libjpeg62-turbo. If installation fails, check the available package names and adjust accordingly.

Tip

To use a different .NET version:

  • .NET 9
    mcr.microsoft.com/dotnet/sdk:9.0
    mcr.microsoft.com/dotnet/aspnet:9.0

  • .NET 8
    mcr.microsoft.com/dotnet/sdk:8.0
    mcr.microsoft.com/dotnet/aspnet:8.0


Deploying to Azure App Service

Azure App Service supports running Docker containers, making it straightforward to deploy applications that use List & Label Cross Platform.

Steps to deploy

  1. Build your Docker image:
    Build your Docker image locally or in your CI/CD pipeline using your Dockerfile. For example:

    docker build -t mylistlabelapp .
    
  2. Push the image to a container registry:
    Push the image to a container registry like Azure Container Registry (ACR) or Docker Hub:

    docker tag mylistlabelapp myregistry.azurecr.io/mylistlabelapp:latest
    docker push myregistry.azurecr.io/mylistlabelapp:latest
    
  3. Create an Azure App Service instance:
    In the Azure Portal, create a new App Service configured for Docker. Choose the "Container" option, and provide the image source details (e.g., registry URL, image name, and tag).

  4. Configure deployment settings:

    • Container settings:
      Configure startup commands if necessary, and ensure that environment variables or settings required are properly set.
    • Continuous deployment (optional):
      Set up continuous deployment from your container registry for automated updates.
  5. Connect your app to the container:
    Once deployed, Azure App Service will run your container. You can monitor logs, manage scaling, and configure networking (such as custom domains or SSL certificates) directly from the Azure Portal.


By following these steps, you can successfully containerize your application with List & Label Cross Platform and deploy it on Azure App Service. This approach ensures a consistent environment from development to production with minimal configuration changes.

For further details on Docker deployment and Azure App Service configuration, refer to the official Docker documentation and Azure App Service documentation.