Skip to content

Commit

Permalink
更新Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
239573049 committed Dec 1, 2024
1 parent a4b0e4e commit 20a683d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions src/NuGet.Next/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER root
USER $APP_UID
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
Expand All @@ -11,14 +11,17 @@ RUN yarn
RUN npm i
RUN yarn run build


FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/NuGet.Next/NuGet.Next.csproj", "src/NuGet.Next/"]
COPY ["src/NuGet.Next.Core/NuGet.Next.Core.csproj", "src/NuGet.Next.Core/"]
COPY ["src/NuGet.Next.Protocol/NuGet.Next.Protocol.csproj", "src/NuGet.Next.Protocol/"]
COPY ["src/NuGet.Next.DM/NuGet.Next.DM.csproj", "src/NuGet.Next.DM/"]
COPY ["src/NuGet.Next.MySql/NuGet.Next.MySql.csproj", "src/NuGet.Next.MySql/"]
COPY ["src/NuGet.Next.PostgreSql/NuGet.Next.PostgreSql.csproj", "src/NuGet.Next.PostgreSql/"]
COPY ["src/NuGet.Next.Sqlite/NuGet.Next.Sqlite.csproj", "src/NuGet.Next.Sqlite/"]
COPY ["src/NuGet.Next.SqlServer/NuGet.Next.SqlServer.csproj", "src/NuGet.Next.SqlServer/"]
RUN dotnet restore "src/NuGet.Next/NuGet.Next.csproj"
COPY . .
WORKDIR "/src/src/NuGet.Next"
Expand Down
12 changes: 6 additions & 6 deletions src/NuGet.Next/NuGet.Next.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@
<ProjectReference Include="..\NuGet.Next.SqlServer\NuGet.Next.SqlServer.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="..\..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>

<ItemGroup>
<None Remove="nuget-next.db-shm" />
<None Remove="nuget-next.db-wal" />
Expand All @@ -48,4 +42,10 @@
</None>
</ItemGroup>

<ItemGroup>
<Content Include="..\..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>

</Project>

0 comments on commit 20a683d

Please sign in to comment.