jd_scripts/docker/Dockerfile

29 lines
774 B
Docker
Raw Normal View History

2020-11-10 09:29:58 +08:00
FROM alpine
2021-01-16 21:39:54 +08:00
LABEL AUTHOR="none" \
VERSION=0.1.3
ENV DEFAULT_LIST_FILE=crontab_list.sh \
CUSTOM_LIST_MERGE_TYPE=append \
REPO_URL=https://gitee.com/lxk0301/jd_scripts.git
2020-11-10 09:29:58 +08:00
RUN set -ex \
&& apk update && apk upgrade\
2021-01-16 21:39:54 +08:00
&& apk add --no-cache tzdata git nodejs moreutils npm curl jq \
2020-11-10 09:29:58 +08:00
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
2021-01-16 21:39:54 +08:00
RUN git clone ${REPO_URL} /scripts \
2020-11-10 09:29:58 +08:00
&& cd /scripts \
2020-12-11 17:08:59 +08:00
&& git checkout master \
2020-11-10 09:29:58 +08:00
&& mkdir logs \
2021-01-16 21:39:54 +08:00
&& npm install
2020-11-10 09:29:58 +08:00
2021-01-16 21:39:54 +08:00
RUN cp /scripts/docker/docker_entrypoint.sh /usr/local/bin \
&& chmod +x /usr/local/bin/docker_entrypoint.sh
2020-11-10 09:29:58 +08:00
WORKDIR /scripts
ENTRYPOINT ["docker_entrypoint.sh"]
2021-01-16 21:39:54 +08:00
CMD [ "crond" ]