From 326a3d3e226714ddf9b3eb4ca523ead53a36c1bb Mon Sep 17 00:00:00 2001 From: MysticBoy Date: Mon, 10 Oct 2022 23:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 1 + IoTSharp/Dockerfile_with_vue | 10 ++++++---- IoTSharp/IoTSharp.csproj | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index 1ec56340..44faecd4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,6 +6,7 @@ **/.settings **/.toolstarget **/*.lock +**/package-lock.json **/.vs **/.vscode **/*.*proj.user diff --git a/IoTSharp/Dockerfile_with_vue b/IoTSharp/Dockerfile_with_vue index 6ed171a5..42ef61bb 100644 --- a/IoTSharp/Dockerfile_with_vue +++ b/IoTSharp/Dockerfile_with_vue @@ -17,7 +17,7 @@ RUN apt-get -y update && \ apt-get autoclean RUN KEYRING=/usr/share/keyrings/nodesource.gpg && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee "$KEYRING" >/dev/null && \ gpg --no-default-keyring --keyring "$KEYRING" --list-keys && \ - VERSION=node_14.x && DISTRO=bullseye && \ + VERSION=node_12.x && DISTRO=bullseye && \ echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \ apt-get -y -q update && \ apt-get install -y nodejs && \ @@ -29,9 +29,11 @@ RUN KEYRING=/usr/share/keyrings/nodesource.gpg && curl -fsSL https://deb.nodesou WORKDIR /src COPY ["IoTSharp/ClientAppVue/package.json", "IoTSharp/ClientAppVue/package.json"] -RUN npm install -g yarn && yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g && \ - yarn config set registry https://registry.npm.taobao.org -g && \ - yarn add sass@1.26.5 --cwd ./IoTSharp/ClientAppVue/ && yarn install --cwd ./IoTSharp/ClientAppVue/ +WORKDIR /src/IoTSharp/ClientApp/ +RUN npm install yarn -g +RUN yarn add node-sass@4.12.0 +RUN yarn install +WORKDIR /src COPY ["IoTSharp/IoTSharp.csproj", "IoTSharp/"] COPY ["IoTSharp.Contracts/IoTSharp.Contracts.csproj", "IoTSharp.Contracts/"] COPY ["IoTSharp.Data.Storage/IoTSharp.Data.Cassandra/IoTSharp.Data.Cassandra.csproj", "IoTSharp.Data.Storage/IoTSharp.Data.Cassandra/"] diff --git a/IoTSharp/IoTSharp.csproj b/IoTSharp/IoTSharp.csproj index ebb5d196..f7cdc92b 100644 --- a/IoTSharp/IoTSharp.csproj +++ b/IoTSharp/IoTSharp.csproj @@ -193,13 +193,13 @@ - + - + -- GitLab