Skip to content

Commit 86e4400

Browse files
authored
Merge pull request #3 from WebODM/copilot/fix-github-actions-build-job
Fix Docker build failure caused by relocated npm wrapper in CI image build
2 parents b83e6be + 437c1b5 commit 86e4400

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ RUN mkdir -p $NVM_DIR /var/www && \
1818
. $NVM_DIR/nvm.sh && \
1919
nvm install $NODE_VERSION && \
2020
nvm alias default $NODE_VERSION && \
21-
ln -sf $(find $NVM_DIR -path "*/bin/node" | head -1) /usr/bin/node && \
22-
ln -sf $(find $NVM_DIR -path "*/bin/npm" | head -1) /usr/bin/npm
21+
ln -sf $(find $NVM_DIR -path "*/bin/node" | head -1) /usr/bin/node
2322

2423
# Install build tools needed to compile native modules (node-libcurl)
2524
RUN apt-get update && \
@@ -30,6 +29,8 @@ RUN apt-get update && \
3029
WORKDIR "/var/www"
3130
COPY . /var/www
3231

33-
RUN npm install --production
32+
RUN . $NVM_DIR/nvm.sh && \
33+
nvm use default && \
34+
npm install --production
3435

3536
ENTRYPOINT ["/usr/bin/node", "/var/www/index.js"]

0 commit comments

Comments
 (0)