更新于 07-13 09:24 支持TS脚本,紧急修复

This commit is contained in:
root
2021-07-13 09:24:48 -04:00
parent 0b1095c842
commit 5412fe1da7
5 changed files with 20 additions and 10 deletions

View File

@ -4,4 +4,6 @@ dir_shell=$(dirname $(readlink -f "$0"))
dir_root=$dir_shell
cd $dir_root
git pull && echo "自动修复完毕,无异常"
git fetch --all
git reset --hard origin/A1
echo "自动修复完毕,无异常"

View File

@ -1,4 +1,5 @@
FROM node:lts-alpine
LABEL maintainer="Highdimen"
ARG REPO=gitee
ARG REPO_URL=$REPO.com
ARG JS_TOOL_URL=https://gitee.com/highdimen/js_tool.git
@ -10,20 +11,28 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
JD_DIR=/root/jd \
ENABLE_TG_BOT=false \
ENABLE_WEB_PANEL=true
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
WORKDIR $JD_DIR
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk update -f \
&& apk upgrade \
&& apk add --no-cache bash coreutils moreutils git wget curl nano perl openssh-client tzdata \
&& apk add --no-cache bash coreutils moreutils git wget curl tzdata perl openssl openssh python3 jq \
&& rm -rf /var/cache/apk/* \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& mkdir -p /root/.ssh \
&& ssh-keyscan $REPO_URL > /root/.ssh/known_hosts \
&& git clone -b $JS_TOOL_BRANCH $JS_TOOL_URL $JD_DIR \
&& git config --global user.email "lan-tianxiang@@users.noreply.github.com" \
&& git config --global user.name "lan-tianxiang" \
&& git config --global pull.rebase true \
&& chmod -R 777 ${JD_DIR}/ \
&& cd ${JD_DIR}/ \
&& bash jd.sh update \
&& bash jd.sh panelon \
&& npm install -g pm2 --registry=https://registry.npm.taobao.org \
&& npm install -g pnpm \
&& pnpm install -g pm2 --registry=https://registry.npm.taobao.org \
&& pnpm install -g ts-node typescript tslib \
&& ln -sf $JD_DIR/jd.sh /usr/local/bin/jd \
&& jd update \
&& jd update \
&& jd panelon \
&& rm -rf /root/.npm
WORKDIR $JD_DIR
ENTRYPOINT bash $JD_DIR/docker/docker/docker-entrypoint.sh

View File

@ -7,7 +7,6 @@ echo
crontab /root/jd/config/crontab.list
jd panelon
jd panelon
echo -e "容器启动成功...\n"

2
jd.sh

File diff suppressed because one or more lines are too long