[Dockerfiles] Used best practices for apt-get
See https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#apt-get
- Replaced `-y install` with `install -y` (unification)
- Put every package on its own line
- Moved `rm -rf /var/lib/apt/lists/*` in the same `RUN` statement as `apt-get`
- Removed unnecessary `apt-get clean`
See 03e2923e42/contrib/mkimage/debootstrap (L82-L105)
This commit is contained in:
@@ -6,8 +6,13 @@ ENV LC_ALL C
|
||||
|
||||
RUN apt-key adv --fetch-keys http://rspamd.com/apt-stable/gpg.key \
|
||||
&& echo "deb http://rspamd.com/apt-stable/ jessie main" > /etc/apt/sources.list.d/rspamd.list \
|
||||
&& apt-get update \
|
||||
&& apt-get --no-install-recommends -y --force-yes install rmilter cron syslog-ng syslog-ng-core supervisor
|
||||
&& apt-get update && apt-get install -y --force-yes --no-install-recommends \
|
||||
rmilter \
|
||||
cron \
|
||||
syslog-ng \
|
||||
syslog-ng-core \
|
||||
supervisor \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||
|
||||
@@ -18,4 +23,4 @@ RUN touch /var/log/mail.log && chmod 640 /var/log/mail.log && chown root:adm /va
|
||||
|
||||
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN rm -rf /tmp/* /var/tmp/*
|
||||
|
Reference in New Issue
Block a user