[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:
@@ -9,8 +9,8 @@ RUN dpkg-divert --local --rename --add /sbin/initctl \
|
||||
&& dpkg-divert --local --rename --add /usr/bin/ischroot \
|
||||
&& ln -sf /bin/true /usr/bin/ischroot
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends supervisor \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
supervisor \
|
||||
postfix \
|
||||
sasl2-bin \
|
||||
libsasl2-modules \
|
||||
@@ -25,7 +25,8 @@ RUN apt-get install -y --no-install-recommends supervisor \
|
||||
python-gpgme \
|
||||
sudo \
|
||||
curl \
|
||||
dirmngr
|
||||
dirmngr \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN addgroup --system --gid 600 zeyple
|
||||
RUN adduser --system --home /var/lib/zeyple --no-create-home --uid 600 --gid 600 --disabled-login zeyple
|
||||
@@ -44,4 +45,4 @@ EXPOSE 588
|
||||
|
||||
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