forked from sonic-net/sonic-platform-daemons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (34 loc) · 1.44 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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/*
## Set the apt source
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 the fundamental packages
RUN apt-get -y install \
rsyslog \
vim-tiny \
perl \
python
COPY rsyslog.conf /etc/rsyslog.conf
RUN apt-get -y purge \
exim4 \
exim4-base \
exim4-config \
exim4-daemon-light
## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
## Note: NO removing /var/lib/apt/lists/*, shared by all derived images
## TODO: if it is possible to squash derived images, remove it here
RUN rm -rf /tmp/*