Skip to content

Commit 39989a4

Browse files
authored
Added active waiting for cmake-js due to (Text file busy) race condition (#349) (#350)
1 parent 63584b0 commit 39989a4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

QuoteVerification/QuoteVerificationService/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ COPY src /qvs/src
5151
COPY configuration-default /qvs/configuration-default
5252
# build QVS
5353
RUN echo 'cmake_QVL_PATH=/qvl/Build/Release/dist' >> /qvs/src/.npmrc # workaround for npm 9+ https://github.com/npm/cli/issues/5852
54-
RUN cd /qvs/src && npm install
55-
# copy compiled bianries
54+
RUN cd /qvs/src && npm install && npm run wait-for-cmake-js && npm run build-native # workaournd for Text file busy race condition https://github.com/nodejs/docker-node/issues/1918
55+
# copy compiled binaries
5656
RUN mkdir -p /qvs/native/lib/ \
5757
&& cp /qvl/Build/Release/dist/lib/*.so /qvs/native/lib/ \
5858
&& cp /qvs/src/qvl/cmake-build-release/Release/*.node /qvs/native/ \

QuoteVerification/QuoteVerificationService/src/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "quoteverificationservice",
33
"scripts": {
4-
"install": "cmake-js build -d qvl/ -O qvl/cmake-build-release",
4+
"wait-for-cmake-js": "timeout 10s bash -c 'until cmake-js --version; do sleep 1; done'",
5+
"build-native": "cmake-js build -d qvl/ -O qvl/cmake-build-release",
56
"swagger": "node swagger.js"
67
},
78
"version": "1.0.0",

0 commit comments

Comments
 (0)