Skip to content

Commit

Permalink
Include dotnet 3.1, 6.0 and 8.0 in devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoopmans committed Jul 30, 2024
1 parent 8bd7ae5 commit c825342
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
27 changes: 26 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS base
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base

# Set up environment
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
Expand All @@ -12,5 +12,30 @@ RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME;


# Install .NET Core 3.1 SDK
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y apt-transport-https \
&& apt-get update \
&& apt-get install -y dotnet-sdk-3.1 \
&& rm -rf /var/lib/apt/lists/*

# Install .NET 5 SDK
RUN apt-get update \
&& apt-get install -y dotnet-sdk-8.0 \
&& rm -rf /var/lib/apt/lists/*

RUN apt update && apt install -y dirmngr ca-certificates gnupg && \
gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
apt update && apt install -y mono-complete ca-certificates-mono && \
rm -rf /var/lib/apt/lists/*



RUN cert-sync /etc/ssl/certs/ca-certificates.crt && \
mozroots --import --sync

USER vscode
ENTRYPOINT ["/bin/bash"]
6 changes: 4 additions & 2 deletions test/Tinify.Tests.Integration/Integration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ public void Should_PreserveMetadata()

/* width == 137 */
Assert.AreEqual(137, metaData.GetImageWidth());
Assert.IsTrue(metaData.ContainsStringInXmpData(VoormediaCopyright));
bool containsCopyright = File.ReadAllText(file.Path).Contains(VoormediaCopyright);
Assert.IsTrue(containsCopyright, "The file should contain the copyright string.");
}
}

Expand All @@ -241,7 +242,8 @@ public void Should_Resize_And_PreserveMetadata()

/* width == 50 */
Assert.AreEqual(50, metaData.GetImageWidth());
Assert.IsTrue(metaData.ContainsStringInXmpData(VoormediaCopyright));
bool containsCopyright = File.ReadAllText(file.Path).Contains(VoormediaCopyright);
Assert.IsTrue(containsCopyright, "The file should contain the copyright string.");
}

[Test]
Expand Down

0 comments on commit c825342

Please sign in to comment.