Skip to content

Commit

Permalink
Test | Docker test enhancement (#2345)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavoudEshtehari authored Feb 13, 2024
1 parent ca5e3e8 commit 237f260
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
FROM mcr.microsoft.com/dotnet/runtime:8.0@sha256:bb9e61f07f93945ab97391b1dcbcc41136b03310583f36e52b3ec2815111e58a AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:8e77ad6fb7c33c17f026424d3bef05ea2ee15d1621e28f312adeab4dc1005866 AS build
WORKDIR /sqlclient
COPY . .

ARG PROJNAME="Microsoft.Data.SqlClient.DockerLinuxTest"
ARG PROJFILE=$PROJNAME".csproj"
ARG DLLFILE=$PROJNAME".dll"

WORKDIR /sqlclient/src/Microsoft.Data.SqlClient/tests/DockerLinuxTest
WORKDIR /sqlclient/src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest
RUN dotnet build $PROJFILE -c Release -o /app/build

FROM build AS publish
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..</DockerfileContext>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<OSGroup>Unix</OSGroup>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.

using System;
using Microsoft.Data.SqlClient;

namespace Microsoft.Data.SqlClient.DockerLinuxTest
{
Expand Down
3 changes: 0 additions & 3 deletions src/docker-compose.dcproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
</PropertyGroup>
<ItemGroup>
<None Include=".dockerignore" />
<None Include="docker-compose.override.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.yml" />
</ItemGroup>
</Project>
3 changes: 0 additions & 3 deletions src/docker-compose.override.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.4'
version: '3.9'

services:
microsoft.data.sqlclient.dockertests:
Expand Down

0 comments on commit 237f260

Please sign in to comment.