-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-jessy
94 lines (72 loc) · 4.32 KB
/
Dockerfile-jessy
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FROM debian:jessie
# Systematically remove packages
RUN apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes systemd systemd-sysv sysv-rc sysvinit-utils
# Add S6 for process management
RUN apt-get install -y curl && cd /tmp && curl -L https://github.com/just-containers/s6-overlay/releases/download/v1.11.0.1/s6-overlay-amd64.tar.gz > /tmp/s6-overlay-amd64.tar.gz && apt-get remove -y curl
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C /
RUN dpkg --purge man-db manpages
RUN apt-get install -y localepurge && dpkg-reconfigure localepurge && localepurge
RUN apt-get install -y deborphan
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes bash
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes bsdutils
#RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes passwd
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes netbase
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes diffutils
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes ncurses-base ncurses-bin
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes startpar
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes sed
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes lsb-base
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes login
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes gzip
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes udev
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes mount
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes grep
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes dmsetup
#RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes base-passwd
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes util-linux
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libuuid-perl
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libcryptsetup4
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libdevmapper1.02.1
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libsystemd0
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libgcrypt20
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libcomerr2
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes iproute2
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libsmartcols1
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libslang2
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libkmod2
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libmount1
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libblkid1
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libprocps3
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libudev1
#RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libustr-1.0-1
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes e2fslibs e2fsprogs
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libncurses5 libncursesw5
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libss2
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libcap2-bin
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libgpg-error0
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes insserv
# Add in Busybox to replace the main utils, more on that later
RUN apt-get install -y busybox dnsmasq && apt-get autoremove -y
# SELinux config
RUN echo "Yes, do as I say!" | apt-get -y remove --force-yes libsemanage-common libsemanage1
# Remove unncessary config/static files
RUN rm -rf /usr/share/bash-completion /lib/udev /usr/share/doc/* /usr/share/doc-base/
RUN dpkg --purge man-db manpages
RUN rm -rf /usr/share/man
#Now properly install BusyBox and remove all binaries it replaces
COPY busy-install.sh /tmp/busy-install.sh
RUN chmod 755 /tmp/busy-install.sh
RUN /tmp/busy-install.sh
#RUN apt-get remove -y tzdata
# Remove Cache and build files
RUN apt-get purge -y $(deborphan)
RUN apt-get remove -y deborphan localepurge
RUN apt-get clean
RUN rm -rf /tmp/*
#Overlay
COPY overlay /
RUN find /etc -name "*.sh" -exec chmod a+x {} \;
RUN apt list --installed
# Scores on the doors please
RUN du -sh / || :