From ed51dc2e86bb4137bfa0612bc242a0fa68fa987f Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 10 Oct 2024 14:42:39 -0700 Subject: [PATCH] update docker with new .net 8 --- .devcontainer/Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b1e805a..c444b78 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,14 @@ -# Use the official .NET 8 SDK image as a base -FROM mcr.microsoft.com/dotnet/sdk:8.0 +FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim -# Install dependencies -RUN apt-get update && apt-get install -y wget apt-transport-https +RUN apt-get update + +RUN apt-get install --yes curl gnupg lsb-release apt-utils + +RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg + +RUN mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg + +RUN sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/debian/$(lsb_release -rs 2>/dev/null | cut -d'.' -f 1)/prod $(lsb_release -cs 2>/dev/null) main" > /etc/apt/sources.list.d/dotnetdev.list' # Add Microsoft package repository and install Azure Functions Core Tools RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg \ @@ -10,12 +16,6 @@ RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor && apt-get update \ && apt-get install -y azure-functions-core-tools-4 -# Set the working directory -WORKDIR /workspace - - -# Copy the project files -COPY . . +RUN apt-get update -# Restore the project dependencies -RUN dotnet restore \ No newline at end of file +RUN apt-get install --yes azure-functions-core-tools-4