Browse Source

perf: add to cron.d (#14375)

* perf: add to cron.d

* 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/14380/head
fit2bot 3 weeks ago committed by GitHub
parent
commit
35b8b080ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      Dockerfile
  2. 5
      Dockerfile-base

6
Dockerfile

@ -1,4 +1,4 @@
FROM jumpserver/core-base:20241029_070330 AS stage-build
FROM jumpserver/core-base:20241029_080218 AS stage-build
ARG VERSION
@ -46,7 +46,9 @@ RUN set -ex \
&& echo "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null\n\tCiphers +aes128-cbc\n\tKexAlgorithms +diffie-hellman-group1-sha1\n\tHostKeyAlgorithms +ssh-rsa" > /root/.ssh/config \
&& echo "no" | dpkg-reconfigure dash \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& 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
COPY --from=stage-build /opt /opt
COPY --from=stage-build /usr/local/bin /usr/local/bin

5
Dockerfile-base

@ -7,7 +7,6 @@ ARG DEPENDENCIES=" \
wget \
g++ \
make \
cron \
pkg-config \
default-libmysqlclient-dev \
freetds-dev \
@ -28,10 +27,6 @@ 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 \

Loading…
Cancel
Save