kingtest commited on
Commit
a39478b
·
verified ·
1 Parent(s): 4abdfdb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -14
Dockerfile CHANGED
@@ -1,14 +1,42 @@
1
- FROM node:14
2
- # 安装git, wget, python等基本工具
3
- RUN apt-get update && apt-get install -y git wget python3 python3-pip
4
- # 克隆青龙仓库
5
- RUN git clone -b main <https://github.com/whyour/qinglong.git> /qinglong
6
- WORKDIR /qinglong
7
- # 安装pm2
8
- RUN npm install pm2 -g
9
- # 安装依赖
10
- RUN npm install --production
11
- # 复制配置文件示例,如果有自定义配置可以修改
12
- COPY .env.example .env
13
- # 启动面板
14
- CMD ["pm2-runtime", "start", "pm2.json"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:alpine
2
+ LABEL maintainer="whyour"
3
+
4
+ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
5
+ LANG=zh_CN.UTF-8 \
6
+ SHELL=/bin/bash \
7
+ PS1="\u@\h:\w \$ " \
8
+ LANG=zh_CN.UTF-8 \
9
+ LANGUAGE=zh_CN.UTF-8 \
10
+ LC_ALL=zh_CN.UTF-8 \
11
+ TZ=Asia/Shanghai
12
+
13
+ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
14
+ && apk update -f \
15
+ && apk upgrade \
16
+ && apk --no-cache add -f bash \
17
+ coreutils \
18
+ moreutils \
19
+ git \
20
+ wget \
21
+ curl \
22
+ nano \
23
+ tzdata \
24
+ perl \
25
+ openssl \
26
+ && rm -rf /var/cache/apk/*
27
+
28
+ RUN git clone https://github.com/whyour/qinglong /ql \
29
+ && cd /ql \
30
+ && git checkout --quiet master \
31
+ && cp docker/docker-entrypoint.sh / \
32
+ && chmod 777 /docker-entrypoint.sh \
33
+ && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
34
+ && echo "Asia/Shanghai" > /etc/timezone \
35
+ && cd /ql/scripts/ \
36
+ && npm install \
37
+ && npm install -g pm2 \
38
+ && pm2 start /ql/build/app.js
39
+
40
+ WORKDIR /ql
41
+
42
+ ENTRYPOINT ["/docker-entrypoint.sh"]