Skip to content

Commit

Permalink
Remove unnecessary and unwarranted npm update during Auspice install
Browse files Browse the repository at this point in the history
This was introduced incidentally, and seemingly unintentionally¹, in
"Replace Alpine-based image with a Debian-based image" (ce07dad), but no
one noticed.

`npm update` is unwarranted because it's intended for maintainers of a
package, not downstream user installs, which is the role we have here.
Its effect was to bump the minimum versions in Auspice's package.json to
the latest available (while still respecting SemVer constraints) and
then install all of Auspice's deps into node_modules/.²  That's
unnecessary because we then run `npm install`, which unlike `npm
update`, also runs pre/post-installation steps Auspice includes.

¹ <#21 (comment)>

² Notably, `npm update` was added when the image had npm v5, which
  updates both package.json and package-lock.json.  We currently have npm
  v6, which does the same.  Subsequent versions, e.g. npm v8, stopped
  updating package.json and only update package-lock.json.
  • Loading branch information
tsibley committed Jun 23, 2023
1 parent bbda96b commit d20eff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ RUN curl -fsSL -o /final/bin/nextclade2 https://github.com/nextstrain/nextclade/
# ⁴ https://github.com/mapbox/node-pre-gyp/blob/v1.0.10/lib/node-pre-gyp.js#L186
WORKDIR /nextstrain/auspice
RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release . \
&& npm update && npm install && npm link
&& npm install && npm link

# Add NCBI Datasets command line tools for access to NCBI Datsets Virus Data Packages
RUN curl -fsSL -o /final/bin/datasets https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-${TARGETARCH}/datasets
Expand Down

0 comments on commit d20eff7

Please sign in to comment.