Fix gitpod Docker build.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-09-24 00:08:01 -05:00
parent 156b1f8173
commit 4b091cb347
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
1 changed files with 3 additions and 12 deletions

15
.gitpod.Dockerfile vendored
View File

@ -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