2017-02-12 20:02:04 -06:00
|
|
|
FROM debian:jessie
|
|
|
|
|
|
|
|
## Clean documentation in FROM image
|
|
|
|
RUN find /usr/share/doc -depth \( -type f -o -type l \) ! -name copyright | xargs rm || true
|
|
|
|
## Clean doc directories that are empty or only contain empty directories
|
|
|
|
RUN while [ -n "$(find /usr/share/doc -depth -type d -empty -print -exec rmdir {} +)" ]; do :; done
|
2017-05-08 17:43:31 -05:00
|
|
|
RUN rm -rf \
|
|
|
|
/usr/share/man/* \
|
|
|
|
/usr/share/groff/* \
|
|
|
|
/usr/share/info/* \
|
|
|
|
/usr/share/lintian/* \
|
|
|
|
/usr/share/linda/* \
|
|
|
|
/var/cache/man/* \
|
|
|
|
/usr/share/locale/*
|
2017-02-12 20:02:04 -06:00
|
|
|
|
2017-02-16 23:48:49 -06:00
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
## Configure data sources for apt/dpkg
|
|
|
|
COPY ["sources.list", "/etc/apt/sources.list"]
|
|
|
|
COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
|
2017-06-08 02:26:42 -05:00
|
|
|
RUN mkdir -p /var/cache/apt/archives && apt-get clean && apt-get update
|
2017-02-12 20:02:04 -06:00
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
## Pre-install fundamental packages
|
|
|
|
RUN apt-get -y install \
|
|
|
|
rsyslog \
|
|
|
|
supervisor \
|
|
|
|
vim-tiny \
|
|
|
|
perl \
|
2017-05-11 20:46:11 -05:00
|
|
|
python \
|
|
|
|
less
|
2017-02-12 20:02:04 -06:00
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
|
|
|
|
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
|
2017-05-11 20:46:11 -05:00
|
|
|
COPY ["root/.vimrc", "/root/.vimrc"]
|
2017-02-12 20:02:04 -06:00
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
RUN apt-get -y purge \
|
|
|
|
exim4 \
|
|
|
|
exim4-base \
|
|
|
|
exim4-config \
|
2017-02-12 20:02:04 -06:00
|
|
|
exim4-daemon-light
|
|
|
|
|
2017-02-21 21:04:43 -06:00
|
|
|
{% if docker_base_dbgs %}
|
|
|
|
## Install common debug-packages
|
|
|
|
RUN apt-get -y install \
|
|
|
|
{% for dbg_pkg in docker_base_dbgs.split(' ') -%}
|
|
|
|
{{ dbg_pkg }}{{' '}}
|
|
|
|
{%- endfor %}
|
2017-05-11 20:46:11 -05:00
|
|
|
{% else %}
|
|
|
|
RUN ln /usr/bin/vim.tiny /usr/bin/vim
|
2017-02-21 21:04:43 -06:00
|
|
|
{% endif %}
|
|
|
|
|
2017-02-12 20:02:04 -06:00
|
|
|
## Clean up apt
|
|
|
|
## Remove /var/lib/apt/lists/*, could be obsoleted for derived images
|
2017-05-08 17:43:31 -05:00
|
|
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y; \
|
|
|
|
rm -rf /var/lib/apt/lists/*; \
|
2017-02-12 20:02:04 -06:00
|
|
|
rm -rf /tmp/*;
|
2017-05-08 17:43:31 -05:00
|
|
|
|