-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (28 loc) · 870 Bytes
/
Dockerfile
File metadata and controls
32 lines (28 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# Node.js Dockerfile
#
# https://github.com/dockerfile/nodejs
#
# Pull base image.
FROM ubuntu
# Install Node.js and change source to aliyun mirrors from taobao in China
RUN \
apt-get install -y -q wget curl git
cd /tmp && \
wget http://npm.taobao.org/mirrors/node/node-latest.tar.gz && \
tar xvzf node-latest.tar.gz && \
rm -f node-latest.tar.gz && \
cd node-v* && \
./configure && \
CXX="g++ -Wno-unused-local-typedefs" make && \
CXX="g++ -Wno-unused-local-typedefs" make install && \
cd /tmp && \
rm -rf /tmp/node-v* && \
npm install -g npm && \
printf '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install -g express srails loopback mongodb mysql moogose
# Define working directory.
WORKDIR /data
# Define default command.
CMD ["bash"]