-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build
43 lines (32 loc) · 1.09 KB
/
Dockerfile.build
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
FROM centos:7
# replace with aliyun repo mirror
# if you don't need, just remove it
# RUN yum install -y sudo wget
# RUN cd /etc/yum.repos.d && sudo mv CentOS-Base.repo CentOS-Base.repo.bak && \
# sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && yum clean all && \
# yum clean all && yum makecache
# for newer gcc
RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-7
# for kernel build
RUN yum install -y make gcc elfutils-libelf-devel bc
# for centos-4.18 kernel build
RUN yum install -y bison flex openssl-devel openssl
# for qemu build
RUN yum install -y gtk2-devel libcap-devel libattr-devel
# for qemu runtime
# RUN yum install -y libX11 gtk2
# for busybox build
RUN yum install -y glibc-static
# for kexec build
RUN yum install -y autoconf
# for make_ext4fs runtime
RUN yum install -y pcre && ln -s /lib64/libpcre.so.1 /lib64/libpcre.so.3
# for root and network
RUN yum install -y sudo iproute net-tools
RUN touch /var/.indocker
ARG USER_NAME
ARG USER_ID
RUN id ${USER_NAME} || useradd ${USER_NAME}
RUN usermod -u ${USER_ID} ${USER_NAME}
USER ${USER_NAME}