|
FROM node:alpine |
|
LABEL maintainer="whyour" |
|
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ |
|
LANG=zh_CN.UTF-8 \ |
|
SHELL=/bin/bash \ |
|
PS1="\u@\h:\w \$ " \ |
|
LANG=zh_CN.UTF-8 \ |
|
LANGUAGE=zh_CN.UTF-8 \ |
|
LC_ALL=zh_CN.UTF-8 \ |
|
TZ=Asia/Shanghai |
|
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ |
|
&& apk update -f \ |
|
&& apk upgrade \ |
|
&& apk --no-cache add -f bash \ |
|
coreutils \ |
|
moreutils \ |
|
git \ |
|
wget \ |
|
curl \ |
|
nano \ |
|
tzdata \ |
|
perl \ |
|
openssl \ |
|
&& rm -rf /var/cache/apk/* |
|
|
|
RUN git clone https://github.com/whyour/qinglong /ql \ |
|
&& cd /ql \ |
|
&& git checkout --quiet master \ |
|
&& cp docker/docker-entrypoint.sh / \ |
|
&& chmod 777 /docker-entrypoint.sh \ |
|
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ |
|
&& echo "Asia/Shanghai" > /etc/timezone \ |
|
&& cd /ql/scripts/ \ |
|
&& npm install \ |
|
&& npm install -g pm2 \ |
|
&& pm2 start /ql/build/app.js |
|
|
|
WORKDIR /ql |
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"] |