Skip to content

Commit abb4c05

Browse files
committed
Merge pull request #4 from GetMagicVision/nodejs-update
Bump nodejs
2 parents 6e25035 + 5d38354 commit abb4c05

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@ FROM ubuntu:14.04
22

33
MAINTAINER MagicVision Team
44

5+
ENV NVM_VERSION v0.29.0
6+
ENV NODEJS_VERSION v5.0.0
7+
58
RUN apt-get update -y
69

710
# Add a normal user with sudo permission
811
RUN adduser --disabled-password --gecos "" ubuntu && echo "ubuntu ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu
912

1013
# Install nvm
1114
RUN apt-get install -y curl build-essential libssl-dev man && \
12-
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | su - ubuntu -c sh && \
15+
curl https://raw.githubusercontent.com/creationix/nvm/$NVM_VERSION/install.sh | su - ubuntu -c sh && \
1316
echo 'export NVM_DIR="$HOME/.nvm"' >> /etc/profile && \
1417
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> /etc/profile
1518

16-
# Install node.js 4.1.0
17-
RUN su - ubuntu -c "nvm install 4.1.0" && \
18-
su - ubuntu -c "nvm alias default 4.1.0" && \
19-
su - ubuntu -c "nvm use 4.1.0"
19+
# Install node.js
20+
RUN su - ubuntu -c "nvm install $NODEJS_VERSION" && \
21+
su - ubuntu -c "nvm alias default $NODEJS_VERSION" && \
22+
su - ubuntu -c "nvm use $NODEJS_VERSION"
2023

2124
# Use Taobao node mirror and npm registry
2225
ENV NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
@@ -55,6 +58,9 @@ RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted
5558
echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse" >> /etc/apt/sources.list && \
5659
apt-get update -y
5760

61+
# Use 114 DNS
62+
RUN echo "nameserver 114.114.114.114" > /etc/resolv.conf
63+
5864
# Create builds dir for CI
5965
RUN mkdir /builds && chmod 777 /builds
6066

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
## Features
1010

1111
- Docker support with [docker:dind][]
12-
- node.js 4.1.0 with npm
12+
- nvm 0.29.0
13+
- node.js 5.0.0 with npm 3.3.6
1314
- Ruby 1.9.1 with gem 1.8.23
1415
- [Saas][] 3.4.18
1516
- git 1.9.1
1617
- python 2.7.6
1718
- bower 1.6.5
1819
- Run commands as a normal user named *ubuntu* with sudo permission
20+
- Provisioning 114 DNS
21+
- Tsinghua Ubuntu mirror
22+
- Taobao nodejs and npm mirror
1923

2024
[docker:dind]: https://hub.docker.com/_/docker/#
2125
[Saas]: https://github.com/sass/sass

0 commit comments

Comments
 (0)