-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 788 Bytes
/
Dockerfile
File metadata and controls
27 lines (23 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS base
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /
# COPY . .
COPY ["/src/.", "src/"]
# COPY ["/src/Here.Api/Here.Api.csproj", "Here.Api/"]
# COPY ["/src/Here.Core/Here.Core.csproj", "Here.Core/"]
# WORKDIR "/Here.Core/"
# RUN dotnet restore "Here.Core.csproj"
# RUN dotnet build "Here.Core.csproj" -c Release -o /app/build
# WORKDIR "/Here.Api/"
RUN dotnet restore "src/Here.Api/Here.Api.csproj"
RUN dotnet build "src/Here.Api/Here.Api.csproj" -c Release -o /app/build
#COPY . .
FROM build AS publish
RUN dotnet publish "src/Here.Api/Here.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
USER 1001
ENTRYPOINT ["dotnet", "Here.dll"]