18 lines
863 B
Docker
18 lines
863 B
Docker
# Create a container for running the OpenTelemetry Redis integration tests.
|
|
# This should be run from the root of the repo:
|
|
# docker build --file test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/Dockerfile .
|
|
|
|
ARG SDK_VERSION=6.0
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal AS build
|
|
ARG PUBLISH_CONFIGURATION=Release
|
|
ARG PUBLISH_FRAMEWORK=net6.0
|
|
WORKDIR /repo
|
|
COPY . ./
|
|
WORKDIR "/repo/test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests"
|
|
RUN dotnet publish "OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.csproj" -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /drop -p:IntegrationBuild=true -p:TARGET_FRAMEWORK=${PUBLISH_FRAMEWORK}
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:${SDK_VERSION} AS final
|
|
WORKDIR /test
|
|
COPY --from=build /drop .
|
|
ENTRYPOINT ["dotnet", "vstest", "OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.dll"]
|