Browse Source

perf: add cron (#14364)

* perf: add cron

* Update Dockerfile-base

* perf: Update Dockerfile with new base image tag

---------

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
pull/14370/head
fit2bot 3 weeks ago committed by GitHub
parent
commit
87e54d8823
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      Dockerfile
  2. 5
      Dockerfile-base
  3. 1
      entrypoint.sh

2
Dockerfile

@ -1,4 +1,4 @@
FROM jumpserver/core-base:20241022_070738 AS stage-build
FROM jumpserver/core-base:20241028_064236 AS stage-build
ARG VERSION

5
Dockerfile-base

@ -5,6 +5,7 @@ ARG TARGETARCH
ARG DEPENDENCIES=" \
ca-certificates \
wget \
cron \
gettext"
ARG APT_MIRROR=http://deb.debian.org
@ -19,6 +20,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash
# Clean up /tmp
RUN echo "0 3 * * * root find /tmp -type f -mtime +1 -size +1M -exec rm -f {} \; && date > /tmp/clean.log" > /etc/cron.d/cleanup_tmp \
&& chmod 0644 /etc/cron.d/cleanup_tmp
# Install bin tools
ARG CHECK_VERSION=v1.0.4
RUN set -ex \

1
entrypoint.sh

@ -22,5 +22,6 @@ elif [[ "$action" == "sleep" ]];then
echo "Sleep 365 days"
sleep 365d
else
which cron &>/dev/null && [[ ! -f /var/run/crond.pid ]] && cron || echo ""
python jms "${action}" "${service}"
fi

Loading…
Cancel
Save