-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
101 lines (87 loc) · 2.13 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
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
94
95
96
97
98
99
100
101
FROM centos:7
MAINTAINER "Roman Pavlyuk" <roman.pavlyuk@gmail.com>
ENV container docker
RUN yum install -y epel-release
RUN yum update -y
RUN yum install -y \
less \
file \
mc \
vim-enhanced \
telnet \
net-tools \
which \
bash-completion \
openssh-clients \
libusb-devel \
libusbx-devel \
cmake \
wget \
git \
pkgconfig \
gcc \
make \
glibc \
autoconf \
automake \
filesystem \
libtool \
strace \
iproute \
traceroute \
man-db \
vim-common \
psmisc
### Let's enable systemd on the container
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
# Install GCC 7
WORKDIR /tmp
RUN wget https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz && \
tar xfz gcc-7.3.0.tar.gz
RUN yum install -y \
libmpc-devel \
mpfr-devel \
gmp-devel \
gcc-c++ \
gcc-c++-devel \
zlib-devel \
zlib
RUN cd gcc-7.3.0 && \
./configure --with-system-zlib --disable-multilib --enable-languages=c,c++ && \
make -j 8 && \
make install && \
rm -rf /tmp/gcc-7.3.0
# Clean the garbage
RUN rm -rf /usr/local/lib/../lib64/libstdc++.so.6.0.24-gdb.py
# Update GLIBC
RUN yum groupinstall -y "Development tools"
RUN yum install -y \
glibc-devel.i686 \
glibc-i686
WORKDIR /tmp
RUN wget https://ftp.gnu.org/gnu/glibc/glibc-2.19.tar.gz && \
tar -xvzf glibc-2.19.tar.gz
RUN cd glibc-2.19 && \
mkdir glibc-build && \
cd glibc-build && \
../configure --prefix='/usr' && \
make && \
make install && \
rm -rf /tmp/glibc-2.19
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/:${PKG_CONFIG_PATH}"
COPY local-lib64.conf /etc/ld.so.conf.d/local-lib64.conf
COPY local-lib.conf /etc/ld.so.conf.d/local-lib.conf
RUN ldconfig
RUN gcc --version
RUN ldd --version
### Kick it off
CMD ["/usr/sbin/init"]