调整dockerfile及构建仓库地址
This commit is contained in:
@@ -1,32 +1,28 @@
|
||||
FROM alpine
|
||||
LABEL AUTHOR="Akira <e.akimoto.akira@gmail.com>" \
|
||||
VERSION=0.1.2 \
|
||||
UPDATE_CONTENT="更新内容较多,重新阅读仓库[Readme](https://github.com/LXK9301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。"
|
||||
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
|
||||
|
||||
RUN set -ex \
|
||||
&& apk update && apk upgrade\
|
||||
&& apk add --no-cache tzdata moreutils git nodejs npm curl jq\
|
||||
&& apk add --no-cache tzdata git nodejs moreutils npm curl jq \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" > /etc/timezone
|
||||
|
||||
RUN git clone https://gitee.com/lxk0301/jd_scripts.git /scripts \
|
||||
RUN git clone ${REPO_URL} /scripts \
|
||||
&& cd /scripts \
|
||||
&& git checkout master \
|
||||
&& mkdir logs \
|
||||
&& npm install \
|
||||
&& cd /tmp \
|
||||
&& npm install request
|
||||
&& npm install
|
||||
|
||||
ENV BUILD_VERSION=0.1.2 \
|
||||
DEFAULT_LIST_FILE=crontab_list.sh \
|
||||
CUSTOM_LIST_MERGE_TYPE=append
|
||||
|
||||
# github action 构建
|
||||
COPY ./docker/docker_entrypoint.sh /usr/local/bin
|
||||
# 本地构建
|
||||
# COPY ./docker_entrypoint.sh /usr/local/bin
|
||||
RUN chmod +x /usr/local/bin/docker_entrypoint.sh
|
||||
RUN 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" ]
|
||||
|
Reference in New Issue
Block a user