summaryrefslogtreecommitdiff
path: root/core/Dockerfile
blob: 04cc96d9c46102a5762d393369aa0fbd9f24ac48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM microsoft/dotnet:sdk AS build-env    
MAINTAINER Dennis Kobert <d-kobert@web.de>    
# Install cgit    
RUN git clone git://github.com/TrueDoctor/DiscoBot && cd DiscoBot && mkdir app && cp DSACore/*.csproj app/    
WORKDIR /DiscoBot/app    
    
RUN dotnet restore    
    
# Copy everything else and build    
RUN cp -r ../DSACore/ ../app &&  dotnet publish -c Release -o out    
    
     
# Build runtime image    
FROM microsoft/dotnet:aspnetcore-runtime    
WORKDIR /app/    
COPY Token ./    
COPY --from=build-env /DiscoBot/app/out .    
RUN cp -r DSACore/Properties ./    
EXPOSE 5000
ENTRYPOINT ["dotnet", "DSACore.dll"]