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
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
|
||||||
|
|
||||||
### Node.js ###
|
### Node.js ###
|
||||||
USER gitpod
|
USER root
|
||||||
ENV NODE_VERSION=16.10.0
|
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - \
|
||||||
ENV TRIGGER_REBUILD=1
|
&& install-packages nodejs
|
||||||
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
|
|
||||||
|
|
||||||
### Docker ###
|
### Docker ###
|
||||||
USER root
|
USER root
|
||||||
|
|
Loading…
Reference in New Issue