elsa-core/docker/ElsaServer-Datadog.Dockerfile

62 lines
2 KiB
Docker
Raw Normal View History

# Version: 1
Add `WorkflowStateCommitted` notification support and update state handling logic - Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details. - Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`. - Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion. Updates KubernetesClient and Microsoft packages (#6917) * Remove Proto.Cluster.Kubernetes dependency due to vulnerability - Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708). - Adjusted related cluster provider and remote configuration logic. - Updated `PortAttribute` default parameter for clarity. * Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability" This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4. * Add KubernetesClient package and update MicrosoftVersion to 9.0.9 - Added `KubernetesClient` package to the project dependencies. - Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`. Update Polly packages - Bump Polly and Polly.Extensions package versions to 8.6.3. Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property Ensure Docker images ship CA trust and add TLS smoke tests (#6918) Remove TlsSmoke project and related solution references - Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`). - Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`). Add comprehensive Copilot coding agent instructions for repository onboarding (#6920) * Initial plan * Add comprehensive .github/copilot-instructions.md with validated build instructions Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> Add ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926) * Introduce asynchronous workflow runner and enhance workflow events. - Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking. - Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`. - Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events. - Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace. - Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios. * Refactor event argument classes to unify namespace and simplify inheritance * Add shared component DotSettings file to support namespace exclusions Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
2025-09-25 18:58:21 +00:00
# Description: Dockerfile for building and running Elsa Server with Datadog and OpenTelemetry auto-instrumentation
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /source
# Copy sources.
COPY src/. ./src
COPY ./NuGet.Config ./
COPY *.props ./
# Restore packages.
RUN dotnet restore "./src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj"
# Build and publish (UseAppHost=false creates platform independent binaries).
WORKDIR /source/src/bundles/Elsa.Server.Web
RUN dotnet build "Elsa.Server.Web.csproj" -c Release -o /app/build
RUN dotnet publish "Elsa.Server.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net10.0
# Move binaries into smaller base image.
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
WORKDIR /app
COPY --from=build /app/publish ./
Add `WorkflowStateCommitted` notification support and update state handling logic - Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details. - Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`. - Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion. Updates KubernetesClient and Microsoft packages (#6917) * Remove Proto.Cluster.Kubernetes dependency due to vulnerability - Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708). - Adjusted related cluster provider and remote configuration logic. - Updated `PortAttribute` default parameter for clarity. * Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability" This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4. * Add KubernetesClient package and update MicrosoftVersion to 9.0.9 - Added `KubernetesClient` package to the project dependencies. - Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`. Update Polly packages - Bump Polly and Polly.Extensions package versions to 8.6.3. Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property Ensure Docker images ship CA trust and add TLS smoke tests (#6918) Remove TlsSmoke project and related solution references - Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`). - Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`). Add comprehensive Copilot coding agent instructions for repository onboarding (#6920) * Initial plan * Add comprehensive .github/copilot-instructions.md with validated build instructions Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> Add ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926) * Introduce asynchronous workflow runner and enhance workflow events. - Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking. - Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`. - Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events. - Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace. - Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios. * Refactor event argument classes to unify namespace and simplify inheritance * Add shared component DotSettings file to support namespace exclusions Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
2025-09-25 18:58:21 +00:00
# Install runtime dependencies, including CA certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
libpython3.11 \
python3.11 \
python3.11-dev \
python3-pip \
unzip \
wget \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set PYTHONNET_PYDLL environment variable
Add OpenTelemetry module (#5810) * Add OpenTelemetry integration for workflow tracing Introduced a new module, Elsa.OpenTelemetry, to provide OpenTelemetry sources for tracing workflow and activity execution. Updated various components and pipeline extensions to support OpenTelemetry tracing throughout the workflow execution process. * Refactor workflow execution pipelines Deleted `WorkflowsFeatureExtensions` and migrated methods to `PipelineWorkflowsFeatureExtensions` with added configurability. Enhanced `ActivityExecutionMiddlewareExtensions` and `ActivityExecutionPipelinePipelineBuilder` to support middleware insertion. Added comprehensive tracing to `OpenTelemetryTracingWorkflowExecutionMiddleware`. * Add OpenTelemetry tracing to activity execution Introduced `OpenTelemetryTracingActivityExecutionMiddleware` to capture tracing information for activity execution within workflows. This middleware logs activity execution start and end events, attaching pertinent activity tags. Added extension method to register this middleware in the workflow execution pipeline. * Set `PYTHONNET_PYDLL` consistently and update workflow pipelines Update Dockerfiles to set the `PYTHONNET_PYDLL` environment variable consistently without spaces. Additionally, refactor `Program.cs` to streamline workflow and activity execution pipeline configurations by using the `WithDefaultWorkflowExecutionPipeline` and `WithDefaultActivityExecutionPipeline` methods. * Enhance OpenTelemetry Tracing Middleware Implementation Add missing activity tags and events to improve telemetry data. Simplify middleware installation syntax for both workflow and activity execution tracing pipelines, ensuring consistent and clear tracing across modules.
2024-07-22 12:36:33 +00:00
ENV PYTHONNET_PYDLL=/usr/lib/aarch64-linux-gnu/libpython3.11.so
# Set environment variables for OpenTelemetry Auto-Instrumentation
Add `WorkflowStateCommitted` notification support and update state handling logic - Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details. - Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`. - Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion. Updates KubernetesClient and Microsoft packages (#6917) * Remove Proto.Cluster.Kubernetes dependency due to vulnerability - Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708). - Adjusted related cluster provider and remote configuration logic. - Updated `PortAttribute` default parameter for clarity. * Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability" This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4. * Add KubernetesClient package and update MicrosoftVersion to 9.0.9 - Added `KubernetesClient` package to the project dependencies. - Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`. Update Polly packages - Bump Polly and Polly.Extensions package versions to 8.6.3. Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property Ensure Docker images ship CA trust and add TLS smoke tests (#6918) Remove TlsSmoke project and related solution references - Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`). - Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`). Add comprehensive Copilot coding agent instructions for repository onboarding (#6920) * Initial plan * Add comprehensive .github/copilot-instructions.md with validated build instructions Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> Add ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926) * Introduce asynchronous workflow runner and enhance workflow events. - Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking. - Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`. - Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events. - Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace. - Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios. * Refactor event argument classes to unify namespace and simplify inheritance * Add shared component DotSettings file to support namespace exclusions Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
2025-09-25 18:58:21 +00:00
ENV OTEL_DOTNET_AUTO_HOME=/otel \
OTEL_LOG_LEVEL="debug"
# Download and extract OpenTelemetry Auto-Instrumentation
ARG OTEL_VERSION=1.7.0
Add `WorkflowStateCommitted` notification support and update state handling logic - Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details. - Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`. - Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion. Updates KubernetesClient and Microsoft packages (#6917) * Remove Proto.Cluster.Kubernetes dependency due to vulnerability - Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708). - Adjusted related cluster provider and remote configuration logic. - Updated `PortAttribute` default parameter for clarity. * Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability" This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4. * Add KubernetesClient package and update MicrosoftVersion to 9.0.9 - Added `KubernetesClient` package to the project dependencies. - Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`. Update Polly packages - Bump Polly and Polly.Extensions package versions to 8.6.3. Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property Ensure Docker images ship CA trust and add TLS smoke tests (#6918) Remove TlsSmoke project and related solution references - Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`). - Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`). Add comprehensive Copilot coding agent instructions for repository onboarding (#6920) * Initial plan * Add comprehensive .github/copilot-instructions.md with validated build instructions Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> Add ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926) * Introduce asynchronous workflow runner and enhance workflow events. - Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking. - Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`. - Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events. - Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace. - Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios. * Refactor event argument classes to unify namespace and simplify inheritance * Add shared component DotSettings file to support namespace exclusions Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
2025-09-25 18:58:21 +00:00
RUN mkdir -p /otel \
&& curl -L -o /otel/otel-dotnet-install.sh "https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v${OTEL_VERSION}/otel-dotnet-auto-install.sh" \
&& chmod +x /otel/otel-dotnet-install.sh \
&& /bin/bash /otel/otel-dotnet-install.sh \
&& chmod +x /otel/instrument.sh
EXPOSE 8080/tcp
EXPOSE 443/tcp
Add `WorkflowStateCommitted` notification support and update state handling logic - Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details. - Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`. - Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion. Updates KubernetesClient and Microsoft packages (#6917) * Remove Proto.Cluster.Kubernetes dependency due to vulnerability - Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708). - Adjusted related cluster provider and remote configuration logic. - Updated `PortAttribute` default parameter for clarity. * Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability" This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4. * Add KubernetesClient package and update MicrosoftVersion to 9.0.9 - Added `KubernetesClient` package to the project dependencies. - Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`. Update Polly packages - Bump Polly and Polly.Extensions package versions to 8.6.3. Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property Ensure Docker images ship CA trust and add TLS smoke tests (#6918) Remove TlsSmoke project and related solution references - Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`). - Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`). Add comprehensive Copilot coding agent instructions for repository onboarding (#6920) * Initial plan * Add comprehensive .github/copilot-instructions.md with validated build instructions Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> Add ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926) * Introduce asynchronous workflow runner and enhance workflow events. - Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking. - Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`. - Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events. - Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace. - Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios. * Refactor event argument classes to unify namespace and simplify inheritance * Add shared component DotSettings file to support namespace exclusions Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
2025-09-25 18:58:21 +00:00
ENTRYPOINT ["/entrypoint.sh"]
CMD ["dotnet", "Elsa.Server.Web.dll"]