refactor(image): reduce the number of layers

!10
This commit is contained in:
2023-05-21 12:46:11 +09:30
parent aa461590a8
commit 4c106025d5

View File

@ -70,10 +70,8 @@ RUN apt update && apt -y --no-install-recommends install \
gpg-agent \ gpg-agent \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
supervisor supervisor \
&& apt -y --no-install-recommends install \
RUN apt update && apt -y --no-install-recommends install \
# System Apps # System Apps
cron \ cron \
rsyslog \ rsyslog \
@ -136,14 +134,8 @@ RUN apt update && apt -y --no-install-recommends install \
dpkg -i dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb; \ dpkg -i dovecot-core_${DOVECOT_BUILD_VERSION}-1_$(echo `dpkg --print-architecture`).deb; \
cp /usr/local/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/; \ cp /usr/local/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/; \
dpkg -i dovecot-core_$DOVECOT_BUILD_VERSION-1_$(echo `dpkg --print-architecture`).deb; \ dpkg -i dovecot-core_$DOVECOT_BUILD_VERSION-1_$(echo `dpkg --print-architecture`).deb; \
fi fi \
&& rm -f /etc/cron.d/e2scrub_all \
# Cleanup, remove cron jobs not required
RUN rm -f /etc/cron.d/e2scrub_all \
&& rm -f /etc/cron.daily/apt-compat \ && rm -f /etc/cron.daily/apt-compat \
&& rm -f /etc/cron.daily/dpkg \ && rm -f /etc/cron.daily/dpkg \
&& rm -f /etc/cron.daily/logrotate && rm -f /etc/cron.daily/logrotate