Merge branch 'pr/111'
(fix conflict) * pr/111: add Node Version Manager (nvm)
This commit is contained in:
commit
117382a050
@ -47,25 +47,11 @@ RUN apt-get update && apt-get install -y --force-yes \
|
|||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
vim \
|
vim \
|
||||||
nano \
|
nano
|
||||||
nodejs \
|
|
||||||
nodejs-dev \
|
|
||||||
npm
|
|
||||||
|
|
||||||
# Clean up, to free some space
|
# Clean up, to free some space
|
||||||
RUN apt-get clean
|
RUN apt-get clean
|
||||||
|
|
||||||
# Install gulp and bower with NPM
|
|
||||||
RUN npm install -g \
|
|
||||||
gulp \
|
|
||||||
bower
|
|
||||||
|
|
||||||
# Link the global gulp to be used locally
|
|
||||||
RUN npm link gulp
|
|
||||||
|
|
||||||
# Add a symbolic link for Node
|
|
||||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
|
||||||
|
|
||||||
# remove load xdebug extension (only load on phpunit command)
|
# remove load xdebug extension (only load on phpunit command)
|
||||||
RUN sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini
|
RUN sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini
|
||||||
|
|
||||||
@ -83,6 +69,18 @@ RUN echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/laravel/vendor/
|
|||||||
RUN pecl install mongodb
|
RUN pecl install mongodb
|
||||||
RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini
|
RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini
|
||||||
|
|
||||||
|
# Install nvm (Node Version Manager)
|
||||||
|
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
|
||||||
|
|
||||||
|
ENV NVM_DIR=/root/.nvm
|
||||||
|
|
||||||
|
# Install stable node
|
||||||
|
RUN . ~/.nvm/nvm.sh \
|
||||||
|
&& nvm install stable \
|
||||||
|
&& nvm use stable \
|
||||||
|
&& nvm alias stable \
|
||||||
|
&& npm install -g gulp bower
|
||||||
|
|
||||||
# Source the bash
|
# Source the bash
|
||||||
RUN . ~/.bashrc
|
RUN . ~/.bashrc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user