Commit 0bd04d93 authored by Jason Ouellet's avatar Jason Ouellet

Modifier le Dockerfile pour l'auto compilation dans DockerHub

parent 13314703
Pipeline #11451 canceled with stages
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /
COPY ["src", "/Here"]
COPY ["tests", "/Here"]
COPY ["Here.sln", "/Here"]
RUN dotnet restore
WORKDIR /src
COPY ["Here.Api/Here.Api.csproj", "Here.Api/"]
COPY ["Here.Core/Here.Core.csproj", "Here.Core/"]
RUN dotnet restore "Here.Api/Here.Api.csproj"
COPY . .
RUN dotnet build -c Release -o /app/build
WORKDIR "/src/Here.Api"
RUN dotnet build "Here.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Here.API.csproj" -c Release -o /app/publish
RUN dotnet publish "Here.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Here.API.dll"]
USER 1001
ENTRYPOINT ["dotnet", "Here.dll"]
\ No newline at end of file
......@@ -5,6 +5,7 @@
<UserSecretsId>db90d3fd-c30e-4a8f-be61-382200637cac</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<AssemblyName>Here</AssemblyName>
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment