dev #9
@ -9,20 +9,21 @@ ENV ASPNETCORE_URLS=http://+:5124
|
|||||||
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
||||||
USER appuser
|
USER appuser
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
ARG configuration=Release
|
ARG configuration=Release
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["Cloud/Cloud.csproj", "Cloud/"]
|
COPY ["Cloud.csproj", "."]
|
||||||
RUN dotnet restore "Cloud/Cloud.csproj"
|
RUN dotnet restore "./Cloud.csproj"
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/Cloud"
|
WORKDIR "/src/."
|
||||||
RUN dotnet build "Cloud.csproj" -c $configuration -o /app/build
|
RUN dotnet build "./Cloud.csproj" -c $configuration -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
ARG configuration=Release
|
ARG configuration=Release
|
||||||
RUN dotnet publish "Cloud.csproj" -c $configuration -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "./Cloud.csproj" -c $configuration -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT ["dotnet", "Cloud.dll"]
|
ENTRYPOINT ["dotnet", "Cloud.dll"]
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ services:
|
|||||||
- "5438:5432"
|
- "5438:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
driver: local
|
driver: local
|
Loading…
x
Reference in New Issue
Block a user