mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
release: infer node version (#9336)
Avoids setting the node version in the release Dockerfile, by using an alias. This allows us to update the node version in one file only. Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
This commit is contained in:
@@ -31,13 +31,14 @@ USER vagrant
|
||||
|
||||
COPY ./scripts/vagrant-linux-unpriv-ui.sh /tmp/scripts/vagrant-linux-unpriv-ui.sh
|
||||
RUN /tmp/scripts/vagrant-linux-unpriv-ui.sh
|
||||
# avoid requiring loading nvm.sh by using a well defined path as an alias to the node version
|
||||
RUN /bin/bash -c '. ~/.nvm/nvm.sh && ln -s ~/.nvm/versions/node/$(nvm current) ~/.nvm/versions/node/.default'
|
||||
|
||||
COPY ./scripts/release/docker-build-all /tmp/scripts/docker-build-all
|
||||
|
||||
# Update PATH with GO bin, yarn, and node
|
||||
ENV NODE_VERSION=v12.19.0
|
||||
ENV GOPATH="/opt/gopath" \
|
||||
PATH="/home/vagrant/.nvm/versions/node/${NODE_VERSION}/bin:/home/vagrant/bin:/opt/gopath/bin:/home/vagrant/.yarn/bin:/home/vagrant/.config/yarn/global/node_modules/.bin:$PATH"
|
||||
PATH="/home/vagrant/.nvm/versions/node/.default/bin:/home/vagrant/bin:/opt/gopath/bin:/home/vagrant/.yarn/bin:/home/vagrant/.config/yarn/global/node_modules/.bin:$PATH"
|
||||
|
||||
RUN mkdir -p /opt/gopath/src/github.com/hashicorp/nomad
|
||||
RUN mkdir -p /home/vagrant/bin \
|
||||
|
||||
@@ -9,7 +9,7 @@ export NVM_DIR="/home/vagrant/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
||||
# Install Node, Ember CLI, and Phantom for UI development
|
||||
# Use exact full version version (e.g. not 12) and update scripts/release/Dockerfile
|
||||
# Use exact full version version (e.g. not 12) for reproducibility purposes
|
||||
nvm install 12.19.0
|
||||
nvm alias default 12.19.0
|
||||
npm install -g ember-cli
|
||||
|
||||
Reference in New Issue
Block a user