File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 3
3
set -x
4
4
set -euo pipefail
5
5
6
+ # shellcheck disable=SC1091
7
+ . lib.sh
8
+
6
9
unpack_rpm () {
7
10
local package=" ${1} "
8
11
curl --retry 3 " http://mirror.centos.org/altarch/7/os/aarch64/Packages/${package} " -O
@@ -35,6 +38,7 @@ cp_gcc_archive() {
35
38
}
36
39
37
40
main () {
41
+ set_centos_ulimit
38
42
yum install -y epel-release
39
43
yum install -y gcc-aarch64-linux-gnu gcc-c++-aarch64-linux-gnu binutils-aarch64-linux-gnu binutils gcc-c++ glibc-devel
40
44
yum clean all
Original file line number Diff line number Diff line change 3
3
4
4
purge_list=()
5
5
6
+ set_centos_ulimit () {
7
+ # this is a bug affecting buildkit with yum when ulimit is unlimited
8
+ # https://github.com/docker/buildx/issues/379#issuecomment-1196517905
9
+ ulimit -n 1024000
10
+ }
11
+
6
12
install_packages () {
7
13
if grep -i ubuntu /etc/os-release; then
8
14
apt-get update
@@ -15,6 +21,7 @@ install_packages() {
15
21
fi
16
22
done
17
23
else
24
+ set_centos_ulimit
18
25
for pkg in " ${@ } " ; do
19
26
if ! yum list installed " ${pkg} " > /dev/null 2> /dev/null; then
20
27
yum install -y " ${pkg} "
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ build_static_libattr() {
54
54
55
55
pushd " ${td} "
56
56
57
+ set_centos_ulimit
57
58
yum install -y gettext
58
59
59
60
curl --retry 3 -sSfL " https://download.savannah.nongnu.org/releases/attr/attr-${version} .src.tar.gz" -O
You can’t perform that action at this time.
0 commit comments