sonic-buildimage/dockers/docker-base/Dockerfile.j2
Joe LeVeque 8f348399f5 [Dockers]: Manage all Docker containers with Supervisord (#573)
- Consolidate config.sh and start.sh scripts into one script (start.sh)
 - Solve issue #435 - All dockers now run supervisord as their ENTRYPOINT
 - All stdout/stderr output from processes managed by supervisord is now sent to syslog instead of their own files
 - Supervisord log messages are now also sent to syslog
 - Removed unused smartmontools package from docker-platform-monitor
2017-05-08 15:43:31 -07:00

55 lines
1.6 KiB
Django/Jinja

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
RUN rm -rf \
/usr/share/man/* \
/usr/share/groff/* \
/usr/share/info/* \
/usr/share/lintian/* \
/usr/share/linda/* \
/var/cache/man/* \
/usr/share/locale/*
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
## Configure data sources for apt/dpkg
COPY ["sources.list", "/etc/apt/sources.list"]
COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
RUN apt-get clean && apt-get update
## Pre-install fundamental packages
RUN apt-get -y install \
rsyslog \
supervisor \
vim-tiny \
perl \
python
COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
RUN apt-get -y purge \
exim4 \
exim4-base \
exim4-config \
exim4-daemon-light
{% if docker_base_dbgs %}
## Install common debug-packages
RUN apt-get -y install \
{% for dbg_pkg in docker_base_dbgs.split(' ') -%}
{{ dbg_pkg }}{{' '}}
{%- endfor %}
{% endif %}
## Clean up apt
## Remove /var/lib/apt/lists/*, could be obsoleted for derived images
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y; \
rm -rf /var/lib/apt/lists/*; \
rm -rf /tmp/*;