File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change
1
+ # Use the official .NET 8 SDK image as a base
1
2
FROM mcr.microsoft.com/dotnet/sdk:8.0
2
3
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
5
6
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
7
12
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
9
15
10
- RUN sudo apt-get update
16
+ # Copy the project files
17
+ COPY . .
11
18
12
- RUN sudo apt-get install azure-functions-core-tools-4
19
+ # Restore the project dependencies
20
+ RUN dotnet restore
You can’t perform that action at this time.
0 commit comments