fix dockerfile build error
This commit is contained in:
@@ -6,15 +6,16 @@ RUN apt-get update && apt-get install -y nodejs npm python3 make g++ && rm -rf /
|
|||||||
|
|
||||||
COPY ./src/ .
|
COPY ./src/ .
|
||||||
|
|
||||||
# Install frontend dependencies before dotnet build
|
# Use npm ci for clean install based on package-lock.json
|
||||||
RUN npm install --prefix ./GreenHome.Web
|
RUN cd ./GreenHome.Web && \
|
||||||
|
npm ci
|
||||||
|
|
||||||
RUN dotnet restore --verbosity detailed
|
RUN dotnet restore --verbosity detailed
|
||||||
RUN dotnet publish -c Release -o /app
|
RUN dotnet publish -c Release -o /app
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app .
|
COPY --from=build /app .
|
||||||
RUN mkdir -p /app/My_StaticFiles
|
RUN mkdir -p /app/My_StaticFiles
|
||||||
RUN mkdir -p /app/files
|
RUN mkdir -p /app/files
|
||||||
ENTRYPOINT ["dotnet", "GreenHome.Api.dll"]
|
ENTRYPOINT ["dotnet", "GreenHome.Api.dll"]
|
||||||
Reference in New Issue
Block a user