Files
main/projects/fangjia-script/Dockerfile
T
2026-05-20 10:09:30 +08:00

24 lines
734 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM openjdk:8-jre-slim
ENV TZ=Asia/Shanghai
RUN apt-get update && apt-get install -y --no-install-recommends wget tzdata && \
wget -q "https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64" \
-O /usr/local/bin/supercronic && \
chmod +x /usr/local/bin/supercronic && \
rm -rf /var/lib/apt/lists/*
# 对齐线上部署路径,/home/goojia/bin/*.sh 中的 cd 路径无需改动
WORKDIR /home/goojia/webapps/fangjia-script
# 构建产物:.groovy 脚本 + lib/*.jar(含 groovy-all.jar,无需单独安装 Groovy)
COPY target/classes/ .
COPY run.sh .
RUN chmod +x run.sh
RUN mkdir -p /home/goojia/logs
COPY crontab.txt /app/crontab
CMD ["supercronic", "/app/crontab"]