Try to fix windows container build error

This commit is contained in:
yanchenw 2018-01-05 14:15:20 -08:00
parent 60fc141792
commit 56a60e3d2f
4 changed files with 4 additions and 9 deletions

View File

@ -10,8 +10,6 @@ WORKDIR /src/src/Web/WebMVC
RUN dotnet build --no-restore -c Release -o /app
FROM build AS publish
RUN bower install --allow-root
RUN dotnet bundle
RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final

View File

@ -27,10 +27,10 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.3" />
</ItemGroup>
<!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="bower install - -allow-root" />
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
</Target>-->
</Target>
<ItemGroup>
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.5.357" />

View File

@ -10,9 +10,6 @@ WORKDIR /src/src/Web/WebSPA
RUN dotnet build --no-restore -c Release -o /app
FROM build AS publish
RUN npm rebuild node-sass
RUN npm install
RUN npm run build:prod
RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final

View File

@ -37,14 +37,14 @@
</ItemGroup>
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
<!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="npm install" />
<Exec Command="npm run build:prod" />
<ItemGroup>
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
<ContentWithTargetPath Include="@(_GeneratedFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
</Target>-->
</Target>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />