Skip to content

Commit 117382a

Browse files
committed
Merge branch 'pr/111'
(fix conflict) * pr/111: add Node Version Manager (nvm)
2 parents 2e930df + 4922c5f commit 117382a

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

workspace/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,11 @@ RUN apt-get update && apt-get install -y --force-yes \
4747
git \
4848
curl \
4949
vim \
50-
nano \
51-
nodejs \
52-
nodejs-dev \
53-
npm
50+
nano
5451

5552
# Clean up, to free some space
5653
RUN apt-get clean
5754

58-
# Install gulp and bower with NPM
59-
RUN npm install -g \
60-
gulp \
61-
bower
62-
63-
# Link the global gulp to be used locally
64-
RUN npm link gulp
65-
66-
# Add a symbolic link for Node
67-
RUN ln -s /usr/bin/nodejs /usr/bin/node
68-
6955
# remove load xdebug extension (only load on phpunit command)
7056
RUN sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini
7157

@@ -83,6 +69,18 @@ RUN echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/laravel/vendor/
8369
RUN pecl install mongodb
8470
RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini
8571

72+
# Install nvm (Node Version Manager)
73+
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
74+
75+
ENV NVM_DIR=/root/.nvm
76+
77+
# Install stable node
78+
RUN . ~/.nvm/nvm.sh \
79+
&& nvm install stable \
80+
&& nvm use stable \
81+
&& nvm alias stable \
82+
&& npm install -g gulp bower
83+
8684
# Source the bash
8785
RUN . ~/.bashrc
8886

0 commit comments

Comments
 (0)