diff --git a/Dockerfile b/Dockerfile index b7c7986..1376a76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,31 +2,25 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build RUN apt-get update && apt-get install -y \ curl \ - gnupg2 + gnupg2 \ + libatomic1 \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean # install nodejs RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg ENV NODE_MAJOR=20 RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -RUN apt-get update && apt-get install nodejs -y +RUN apt-get update && apt-get install nodejs -y --no-install-recommends && rm -rf /var/lib/apt/lists/* && apt-get clean -# update npm -RUN npm install -g npm - -# install pnpm -RUN npm install -g pnpm - -# verify npm is installed -RUN npm --version +# update npm and install pnpm +RUN npm install -g npm && npm install -g pnpm && npm cache clean --force WORKDIR /app # install wasm-tools workload RUN dotnet workload install wasm-tools -# install missing lib -RUN apt-get install -y libatomic1 - # Copy csproj and restore as distinct layers COPY *.sln . @@ -63,6 +57,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime WORKDIR /app -COPY --from=build /app/src/NSeguin.Dev.Web/out ./ +COPY --from=build /app/out ./ ENTRYPOINT ["dotnet", "NSeguin.Dev.Web.dll"] \ No newline at end of file