2017-09-29 13:22:00 +09:00
|
|
|
FROM microsoft/aspnetcore-build AS builder
|
|
|
|
WORKDIR /source
|
|
|
|
# caches restore result by copying csproj file separately
|
|
|
|
COPY *.csproj .
|
|
|
|
RUN dotnet restore
|
|
|
|
# copies the rest of your code
|
2017-09-28 19:00:46 +09:00
|
|
|
COPY . .
|
2017-09-29 13:22:00 +09:00
|
|
|
RUN dotnet publish --output /app/ --configuration Release
|
2017-09-28 00:16:37 +09:00
|
|
|
|
2017-09-28 19:00:46 +09:00
|
|
|
FROM microsoft/aspnetcore:2.0.0
|
|
|
|
WORKDIR /app
|
2017-09-29 13:52:53 +09:00
|
|
|
|
|
|
|
RUN mkdir /datadir
|
|
|
|
ENV BTCPAY_DATADIR=/datadir
|
|
|
|
VOLUME /datadir
|
|
|
|
|
2017-09-29 13:22:00 +09:00
|
|
|
COPY --from=builder "/app" .
|
2017-09-28 16:35:29 +09:00
|
|
|
ENTRYPOINT ["dotnet", "BTCPayServer.dll"]
|