diff --git a/build.sh b/build.sh index 5eb32b4c7..2115b2aeb 100755 --- a/build.sh +++ b/build.sh @@ -53,5 +53,7 @@ dockerbuild() if [ ! -z "$BUILD_IN_DOCKER" ]; then dockerbuild $args else + # Run under sudo so we can set ulimit + # See https://github.com/dotnet/core-eng/issues/14808 sudo $DIR/run-build.sh $args fi diff --git a/run-build.sh b/run-build.sh index 99a408cf2..fe839eb80 100755 --- a/run-build.sh +++ b/run-build.sh @@ -26,6 +26,7 @@ CUSTOM_BUILD_ARGS= [ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages" # Set max number of files open, helps avoid errors during NuGet restore +# See https://github.com/dotnet/core-eng/issues/14808 ulimit -n 16384 args=( )