Skip to content

Conversation

@Navaneethnanda
Copy link
Contributor

This PR addresses the issue described in #3245.

Type of Issue: Bug

Current Behavior:
When building a Docker image following the instructions in
[ContainerReferenceServer.md](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/Docs/ContainerReferenceServer.md),
the resulting image (or the one hosted on GitHub) fails to run.
This occurs because the Dockerfile currently uses unversioned base images:

FROM mcr.microsoft.com/dotnet/runtime AS base
FROM mcr.microsoft.com/dotnet/sdk AS build

These pull the latest .NET (currently 9.0) images, while the environment variables are still configured for .NET 8.0.
As a result, the container fails to run due to version mismatch.

Resolution:
The project has been tested and verified to be compatible with .NET 9.0.
The environment options in the Dockerfile have been updated to target .NET 9.0 accordingly.
This ensures compatibility with both .NET 9.0 and later versions.

Expected Behavior:
The container builds and runs successfully without errors.

Steps to Reproduce:

  1. Build the Docker image using the existing instructions.

  2. Observe that the container fails to start due to version mismatch.

  3. With this fix applied, the container should run correctly using:

    FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
    FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
    

Updated base, build images, and all target framework flags to net9.0 for consistent container builds.
@CLAassistant
Copy link

CLAassistant commented Oct 9, 2025

CLA assistant check
All committers have signed the CLA.

@marcschier
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcschier marcschier self-assigned this Oct 12, 2025
@marcschier marcschier merged commit 47b360d into OPCFoundation:master Oct 12, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants