Skip to content

Commit 3642c09

Browse files
committed
update docker file
1 parent 82d1a0b commit 3642c09

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.devcontainer/Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
# Use the official .NET 8 SDK image as a base
12
FROM mcr.microsoft.com/dotnet/sdk:8.0
23

3-
# Install Azure Functions Core Tools
4-
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
4+
# Install dependencies
5+
RUN apt-get update && apt-get install -y wget apt-transport-https
56

6-
RUN sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
7+
# Add Microsoft package repository and install Azure Functions Core Tools
8+
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg \
9+
&& wget -qO- https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/microsoft-prod.list \
10+
&& apt-get update \
11+
&& apt-get install -y azure-functions-core-tools-4
712

8-
RUN sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/debian/$(lsb_release -rs | cut -d'.' -f 1)/prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list'
13+
# Set the working directory
14+
WORKDIR /workspace
915

10-
RUN sudo apt-get update
16+
# Copy the project files
17+
COPY . .
1118

12-
RUN sudo apt-get install azure-functions-core-tools-4
19+
# Restore the project dependencies
20+
RUN dotnet restore

0 commit comments

Comments
 (0)