mirror of https://github.com/jumpserver/jumpserver
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
parent
4219d54db3
commit
35b8b080ab
|
@ -1,4 +1,4 @@
|
||||||
FROM jumpserver/core-base:20241029_070330 AS stage-build
|
FROM jumpserver/core-base:20241029_080218 AS stage-build
|
||||||
|
|
||||||
ARG VERSION
|
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 "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 \
|
&& echo "no" | dpkg-reconfigure dash \
|
||||||
&& apt-get clean all \
|
&& 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 /opt /opt
|
||||||
COPY --from=stage-build /usr/local/bin /usr/local/bin
|
COPY --from=stage-build /usr/local/bin /usr/local/bin
|
||||||
|
|
|
@ -7,7 +7,6 @@ ARG DEPENDENCIES=" \
|
||||||
wget \
|
wget \
|
||||||
g++ \
|
g++ \
|
||||||
make \
|
make \
|
||||||
cron \
|
|
||||||
pkg-config \
|
pkg-config \
|
||||||
default-libmysqlclient-dev \
|
default-libmysqlclient-dev \
|
||||||
freetds-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} \
|
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
|
||||||
&& echo "no" | dpkg-reconfigure dash
|
&& 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
|
# Install bin tools
|
||||||
ARG CHECK_VERSION=v1.0.4
|
ARG CHECK_VERSION=v1.0.4
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
|
|
Loading…
Reference in New Issue