Can you update so the Dockerfile to fix this issue it is related i think to NPM package missing
https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/Dockerfile
I think it missed the NPM Restore package step and yarn build step RUN yarn RUN yarn run build
Thanks i added the yarn run build in the Dockerfile but i got a strange error in the Azure Pipeline
Step 23/38 : RUN yarn run build ---> Running in 5a828dd87f77 yarn run v1.22.5 warning package.json: No license field $ yarn && gulp build warning package.json: No license field warning [email protected]: No license field [1/4] Resolving packages... success Already up-to-date. [08:01:51] Using gulpfile /app/gulpfile.js [08:01:51] Starting 'build'... File not found: /app/node_modules/gridstack/dist/gridstack.jQueryUI.min.js File not found: /app/wwwroot/view-resources/Areas/App/Views/CustomizableDashboard/Widgets/WidgetBase.js File not found: /app/wwwroot/view-resources/Areas/App/Views/CustomizableDashboard/Index.js File not found: /app/wwwroot/view-resources/Areas/App/Views/Common/Modals/_LookupModal.js File not found: /app/wwwroot/view-resources/Areas/App/Views/Common/Modals/_EntityTypeHistoryModal.js ..... [08:01:52] 'build' errored after 350 ms [08:01:52] Error: Invalid glob argument: at Gulp.src (/app/node_modules/vinyl-fs/lib/src/index.js:20:11) at createScriptBundle (/app/gulpfile.js:150:23) at createScriptBundles (/app/gulpfile.js:139:13) at build (/app/gulpfile.js:270:23) at build (/app/node_modules/undertaker/lib/set-task.js:13:15) at bound (node:domain:416:15) at runBound (node:domain:427:12) at asyncRunner (/app/node_modules/async-done/index.js:55:18) at processTicksAndRejections (node:internal/process/task_queues:76:11) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. The command '/bin/sh -c yarn run build' returned a non-zero code: 1
Hi We tried to use the Dockerfile on the MVC project to build a docker image We use latest ASP.NET CORE MVC JQUERY
Here is the Generated Dockerfile by ASPNETZERO
Can you please provide exact Dockerfile include the minification process (npm run build)
-->
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base WORKDIR /app EXPOSE 80 EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build WORKDIR /src COPY ["src/ABC.ADMIN.Web.Mvc/ABC.ADMIN.Web.Mvc.csproj", "src/ABC.ADMIN.Web.Mvc/"] COPY ["src/ABC.ADMIN.Web.Core/ABC.ADMIN.Web.Core.csproj", "src/ABC.ADMIN.Web.Core/"] COPY ["src/ABC.ADMIN.Application/ABC.ADMIN.Application.csproj", "src/ABC.ADMIN.Application/"] COPY ["src/ABC.ADMIN.Application.Shared/ABC.ADMIN.Application.Shared.csproj", "src/ABC.ADMIN.Application.Shared/"] COPY ["src/ABC.ADMIN.Core.Shared/ABC.ADMIN.Core.Shared.csproj", "src/ABC.ADMIN.Core.Shared/"] COPY ["src/ABC.ADMIN.Core/ABC.ADMIN.Core.csproj", "src/ABC.ADMIN.Core/"] COPY ["src/ABC.ADMIN.EntityFrameworkCore/DUOKEY.ADMIN.EntityFrameworkCore.csproj", "src/ABC.ADMIN.EntityFrameworkCore/"] COPY ["src/ABC.ADMIN.GraphQL/ABC.ADMIN.GraphQL.csproj", "src/ABC.ADMIN.GraphQL/"] RUN dotnet restore "src/ABC.ADMIN.Web.Mvc/ABC.ADMIN.Web.Mvc.csproj" COPY . . WORKDIR "/src/src/ABC.ADMIN.Web.Mvc" RUN dotnet build "ABC.ADMIN.Web.Mvc.csproj" -c Release -o /app/build
FROM build AS publish RUN dotnet publish "ABC.ADMIN.Web.Mvc.csproj" -c Release -o /app/publish
FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "ABC.ADMIN.Web.Mvc.dll"]