-
Notifications
You must be signed in to change notification settings - Fork 552
Closed
Labels
Milestone
Description
When debugging in Docker, if I install some npm packages in the base image, they are not preserved in the Debug instance.
My Dockerfile is super simple:
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
RUN apt-get update && \
apt-get -y install build-essential curl gnupg pkg-config libcairo2-dev libjpeg-dev libgif-dev python-pypdf2
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get -y install nodejs
WORKDIR /src
COPY ["Node/package.json", "."]
RUN npm install --production --silent && mkdir -p /app/bin/Debug/netcoreapp2.2/Node/ && mv node_modules /app/bin/Debug/netcoreapp2.2/Node/
Which makes me think that the folder /app/bin/Debug is being overwritten after the .NET Core publish stage is done.
Is there any way I can run the npm install command after the .NET Core app is published?
(Or as a workaround, try to copy the node_modules folder to /app/bin/Debug/netcoreapp2.2/Node/`)
Thank you!
Reactions are currently unavailable