fix: fix npm build step

This commit is contained in:
Oliver Booth 2023-09-26 15:16:00 +01:00
parent d6cf2d760b
commit 8e3ddbac55
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5

View File

@ -1,11 +1,3 @@
# run Gulp to build the app
FROM node:12.16.1-alpine as build-stage
COPY package*.json ./
COPY Gulpfile.js ./
RUN npm install --global gulp-cli
RUN npm install
RUN gulp
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
@ -16,6 +8,14 @@ WORKDIR /src
COPY ["OliverBooth/OliverBooth.csproj", "OliverBooth/"]
RUN dotnet restore "OliverBooth/OliverBooth.csproj"
COPY . .
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
RUN npm i -g gulp-cli
RUN npm i
RUN gulp
WORKDIR "/src/OliverBooth"
RUN dotnet build "OliverBooth.csproj" -c Release -o /app/build