-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
43 lines (35 loc) · 1.23 KB
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgdiplus libc6-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG ASPNETCORE_ENVIRONMENT
ENV ASPNETCORE_ENVIRONMENT=$ASPNETCORE_ENVIRONMENT
ENV ASPNETCORE_URLS http://*:5000
EXPOSE 5000
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS builder
ARG Configuration=debug
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgdiplus libc6-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /EPlast
COPY ./EPlast/*.sln ./
COPY ./EPlast/EPlast.BLL/*.csproj ./EPlast.BLL/
COPY ./EPlast/EPlast.DataAccess/*.csproj ./EPlast.DataAccess/
COPY ./EPlast/EPlast.Resources/*.csproj ./EPlast.Resources/
COPY ./EPlast/EPlast.Tests/*.csproj ./EPlast.Tests/
COPY ./EPlast/EPlast.WebApi/*.csproj ./EPlast.WebApi/
COPY ./EPlast/EPlast.XUnitTest/*.csproj ./EPlast.XUnitTest/
RUN dotnet restore
COPY ./EPlast/ ./
WORKDIR /EPlast
RUN dotnet build -c $Configuration -o /app
FROM builder AS publish
ARG Configuration=debug
RUN dotnet publish -c $Configuration -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "EPlast.WebApi.dll"]