File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ RUN chmod +x /entrypoint.sh \
1010
1111RUN apk update && apk add mongodb=3.4.4-r0 nodejs npm
1212
13+ RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
14+
1315WORKDIR /yapi-src
1416
1517ADD https://github.com/YMFE/yapi/archive/refs/tags/v${YAPI_VERSION}.tar.gz /yapi-src
1618
1719RUN tar -zxf v${YAPI_VERSION}.tar.gz && rm v${YAPI_VERSION}.tar.gz && mv yapi-${YAPI_VERSION} vendors
1820
19- RUN cd /yapi-src/vendors && npm install --production --registry https://registry.npm.taobao.org
21+ RUN cd /yapi-src/vendors && cnpm install --production && cnpm cache clean --force
2022
2123RUN cd /yapi-src && tar -zcf vendors.tar.gz vendors && rm -rf vendors
2224
Original file line number Diff line number Diff line change 11{
22 "port" : " 3000" ,
3- "adminAccount" : " admin@anoyi .com" ,
3+ "adminAccount" : " admin@admin .com" ,
44 "timeout" :120000 ,
55 "db" : {
66 "servername" : " 127.0.0.1" ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ tar -zxf /yapi-src/vendors.tar.gz -C /yapi
77
88if [ ! -f " /yapi/init.lock" ]; then
99 tar -zxf /yapi-src/vendors.tar.gz -C /yapi
10- cd /yapi/vendors && npm run install-server
10+ cd /yapi/vendors && cnpm run install-server
1111fi
1212
1313exec " $@ "
You can’t perform that action at this time.
0 commit comments