-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (27 loc) · 991 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
31
32
33
FROM node:lts-alpine3.13
LABEL AUTHOR="Clackz" \
VERSION=0.1.0
ENV DEFAULT_LIST_FILE=crontab_list.sh \
CUSTOM_LIST_MERGE_TYPE=append \
COOKIES_LIST=/scripts/logs/cookies.list \
REPO_URL=https://github.com/JDHelloWorld/jd_scripts.git \
REPO_BRANCH=main \
DOCKER_URL=https://github.com/Clackz/docker.git
RUN set -ex \
&& apk update \
&& apk upgrade \
&& apk add --no-cache bash tzdata git moreutils curl jq \
&& rm -rf /var/cache/apk/* \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& git clone -b $REPO_BRANCH $REPO_URL /scripts \
&& cd /scripts \
&& mkdir logs \
&& npm config set registry https://registry.npm.taobao.org \
&& npm install \
&& git clone $DOCKER_URL\
&& cp /scripts/docker/docker_entrypoint.sh /usr/local/bin \
&& chmod +x /usr/local/bin/docker_entrypoint.sh
WORKDIR /scripts
ENTRYPOINT ["docker_entrypoint.sh"]
CMD [ "crond" ]