diff --git a/src/Dockerfile.arm32 b/src/Dockerfile.arm32 new file mode 100644 index 0000000..b0a0a19 --- /dev/null +++ b/src/Dockerfile.arm32 @@ -0,0 +1,27 @@ +FROM microsoft/dotnet:2.1-sdk-alpine AS build +WORKDIR /app + +# copy csproj and restore as distinct layers +COPY nuget.config . +COPY *.sln . +COPY HomeAutio.Mqtt.TiVo/*.csproj ./HomeAutio.Mqtt.TiVo/ +RUN dotnet restore + +# copy and build everything else +COPY HomeAutio.Mqtt.TiVo/. ./HomeAutio.Mqtt.TiVo/ +RUN dotnet build -c Release + +# publish +FROM build AS publish +WORKDIR /app/HomeAutio.Mqtt.TiVo +RUN dotnet publish -o out + +# build runtime image +FROM microsoft/dotnet:2.1-aspnetcore-runtime-stretch-slim-arm32v7 AS runtime +WORKDIR /app +COPY --from=publish /app/HomeAutio.Mqtt.TiVo/out ./ + +ENV ENVIRONMENT Production + +VOLUME ["/app/appsettings.Production.json", "/app/logs"] +ENTRYPOINT ["dotnet", "HomeAutio.Mqtt.TiVo.dll"] \ No newline at end of file