Skip to content

Commit c09083d

Browse files
chore: switch to chiseled base image (#87)
1 parent 1ced9ac commit c09083d

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
# This stage is used when running from VS in fast mode (Default for Debug configuration)
2-
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
3-
USER $APP_UID
4-
WORKDIR /app
1+
# This stage is used when running from VS in fast mode (Default for Debug configuration)
2+
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble-chiseled-extra AS base
3+
USER $APP_UID
4+
WORKDIR /app
55
EXPOSE 9443
6-
7-
# This stage is used to build the service project
8-
ARG BUILDPLATFORM=linux/amd64
9-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
10-
ARG BUILD_CONFIGURATION=Release
6+
7+
# This stage is used to build the service project
8+
ARG BUILDPLATFORM=linux/amd64
9+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-noble AS build
10+
ARG BUILD_CONFIGURATION=Release
1111
ARG VERSION=0.0.1
12-
WORKDIR /src
13-
COPY ["Function.SDK.CSharp.Sample/Function.SDK.CSharp.Sample.csproj", "Function.SDK.CSharp.Sample/"]
14-
COPY ["Function.SDK.CSharp.SourceGenerator/Function.SDK.CSharp.SourceGenerator.csproj", "Function.SDK.CSharp.SourceGenerator/"]
15-
COPY ["Function.SDK.CSharp/Function.SDK.CSharp.csproj", "Function.SDK.CSharp/"]
16-
RUN dotnet restore "./Function.SDK.CSharp.Sample/Function.SDK.CSharp.Sample.csproj"
17-
COPY . .
18-
WORKDIR "/src/Function.SDK.CSharp.Sample"
12+
WORKDIR /src
13+
COPY ["Function.SDK.CSharp.Sample/Function.SDK.CSharp.Sample.csproj", "Function.SDK.CSharp.Sample/"]
14+
COPY ["Function.SDK.CSharp.SourceGenerator/Function.SDK.CSharp.SourceGenerator.csproj", "Function.SDK.CSharp.SourceGenerator/"]
15+
COPY ["Function.SDK.CSharp/Function.SDK.CSharp.csproj", "Function.SDK.CSharp/"]
16+
RUN dotnet restore "./Function.SDK.CSharp.Sample/Function.SDK.CSharp.Sample.csproj"
17+
COPY . .
18+
WORKDIR "/src/Function.SDK.CSharp.Sample"
1919
RUN dotnet build "./Function.SDK.CSharp.Sample.csproj" -c $BUILD_CONFIGURATION --use-current-runtime -o /app/build /p:Version=${VERSION}
20-
21-
# This stage is used to publish the service project to be copied to the final stage
22-
FROM build AS publish
23-
ARG BUILD_CONFIGURATION=Release
20+
21+
# This stage is used to publish the service project to be copied to the final stage
22+
FROM build AS publish
23+
ARG BUILD_CONFIGURATION=Release
2424
ARG VERSION=0.0.1
2525
RUN dotnet publish "./Function.SDK.CSharp.Sample.csproj" -c $BUILD_CONFIGURATION --use-current-runtime -o /app/publish /p:UseAppHost=false /p:Version=${VERSION}
26-
27-
# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
28-
FROM base AS final
26+
27+
# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
28+
FROM base AS final
2929

3030
WORKDIR /
3131
COPY Function.SDK.CSharp.Sample/package.yaml .
3232

33-
WORKDIR /app
34-
COPY --from=publish /app/publish .
33+
WORKDIR /app
34+
COPY --from=publish /app/publish .
3535
ENTRYPOINT ["dotnet", "Function.SDK.CSharp.Sample.dll"]

0 commit comments

Comments
 (0)