Commit d37eb641 authored by boncho vylkov's avatar boncho vylkov

fixed the gulp install in the docker file

parent 81a647d4
......@@ -9,20 +9,33 @@ RUN dotnet restore "Web/MvcCoreTemplate.Web/MvcCoreTemplate.Web.csproj"
COPY . .
WORKDIR "/src/Web/MvcCoreTemplate.Web"
RUN dotnet build "MvcCoreTemplate.Web.csproj" -c Release -o /app
RUN dotnet build "MvcCoreTemplate.Web.csproj" -c Release -o /result
FROM build AS publish
RUN dotnet publish "MvcCoreTemplate.Web.csproj" -c Release -o /app
#getting all the nesacery items to build the wwwroot folder in the multi stage container (check for wwwroot and node_modules folders)
FROM node:8.11 as nodeBuild
COPY --from=build ["src/Web/MvcCoreTemplate.Web/package.json","src/Web/MvcCoreTemplate.Web/gulpfile.js", "node_build/"]
COPY --from=build ["src/Web/MvcCoreTemplate.Web/app", "node_build/app/"]
WORKDIR "/node_build"
FROM node:8.11 as node-build
Run ls
RUN npm install
#RUN npm install gulp -g
#RUN npm install gulp
#RUN npm link gulp
RUN npm install -g gulp
RUN npm install gulp
RUN gulp build
#RUN gulp release
#CMD ["gulp","release"]
FROM build AS publish
RUN dotnet publish "MvcCoreTemplate.Web.csproj" -c Release -o /result
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
COPY --from=publish ["/result", "./"]
COPY --from=publish ["src/Web/MvcCoreTemplate.Web/app", "app/"]
COPY --from=nodeBuild ["node_build/wwwroot", "wwwroot/"]
#RUN ls
#RUN ls app
RUN ls wwwroot
RUN ls wwwroot/lib/jquery
ENTRYPOINT ["dotnet", "MvcCoreTemplate.Web.dll"]
\ No newline at end of file
......@@ -134,8 +134,8 @@ gulp.task('setup-libs-js', function (done) {
return gulp
.src(js)
.pipe(rename(function (path) {
var libName = path.dirname.split('\\')[0];
path.dirname = libName + '\\js';
var libName = path.dirname.split('/')[0];
path.dirname = libName + '/js';
}))
.pipe(gulp.dest(paths.lib.js));
});
......@@ -148,8 +148,8 @@ gulp.task('setup-libs-css', function (done) {
return gulp
.src(css)
.pipe(rename(function (path) {
var libName = path.dirname.split('\\')[0];
path.dirname = libName + '\\css';
var libName = path.dirname.split('/')[0];
path.dirname = libName + '/css';
}))
.pipe(gulp.dest(paths.lib.css));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment