jd_scripts/docker/Dockerfile

33 lines
1.0 KiB
Docker
Raw Normal View History

2020-11-10 09:29:58 +08:00
FROM alpine
LABEL AUTHOR="Akira <e.akimoto.akira@gmail.com>" \
VERSION=0.1.2 \
2021-01-16 17:10:19 +08:00
UPDATE_CONTENT="更新内容较多,重新阅读仓库[Readme](https://github.com/LXK9301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。"
2020-11-10 09:29:58 +08:00
RUN set -ex \
&& apk update && apk upgrade\
&& apk add --no-cache tzdata moreutils git nodejs 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-14 18:44:55 +08:00
RUN git clone https://gitee.com/lxk0301/jd_scripts.git /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 \
&& npm install \
2020-11-17 10:59:34 +08:00
&& cd /tmp \
2020-11-10 09:29:58 +08:00
&& npm install request
ENV BUILD_VERSION=0.1.2 \
DEFAULT_LIST_FILE=crontab_list.sh \
CUSTOM_LIST_MERGE_TYPE=append
2020-11-10 09:29:58 +08:00
# github action 构建
COPY ./docker/docker_entrypoint.sh /usr/local/bin
# 本地构建
# COPY ./docker_entrypoint.sh /usr/local/bin
2020-12-11 17:05:35 +08:00
RUN chmod +x /usr/local/bin/docker_entrypoint.sh
2020-11-10 09:29:58 +08:00
WORKDIR /scripts
ENTRYPOINT ["docker_entrypoint.sh"]