Fix gitpod Docker build.
This commit is contained in:
parent
156b1f8173
commit
4b091cb347
|
@ -15,18 +15,9 @@ RUN add-apt-repository -y ppa:ondrej/php \
|
|||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
|
||||
|
||||
### Node.js ###
|
||||
USER gitpod
|
||||
ENV NODE_VERSION=16.10.0
|
||||
ENV TRIGGER_REBUILD=1
|
||||
RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | PROFILE=/dev/null bash \
|
||||
&& bash -c ". .nvm/nvm.sh \
|
||||
&& nvm install $NODE_VERSION \
|
||||
&& nvm alias default $NODE_VERSION \
|
||||
&& npm install -g typescript yarn node-gyp" \
|
||||
&& echo ". ~/.nvm/nvm-lazy.sh" >> /home/gitpod/.bashrc.d/50-node
|
||||
# above, we are adding the lazy nvm init to .bashrc, because one is executed on interactive shells, the other for non-interactive shells (e.g. plugin-host)
|
||||
COPY --chown=gitpod:gitpod nvm-lazy.sh /home/gitpod/.nvm/nvm-lazy.sh
|
||||
ENV PATH=$PATH:/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin
|
||||
USER root
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - \
|
||||
&& install-packages nodejs
|
||||
|
||||
### Docker ###
|
||||
USER root
|
||||
|
|
Loading…
Reference in New Issue