Skip to content

Commit c4ed971

Browse files
m4airm4air
authored andcommitted
build: use available IPv4 route for toolchain downloads
1 parent 67828b5 commit c4ed971

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎config/bun-conpty-build/build-disposable.sh‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ git -C "$bun_build_root/bun" checkout 744846f844374847c902b5e7fd59b4342a51ef99
99
git -C "$bun_build_root/bun" submodule update --init --recursive --depth 1
1010
git -C "$bun_build_root/bun" apply --check "$fixture_dir/bundled-conpty.patch"
1111
git -C "$bun_build_root/bun" apply "$fixture_dir/bundled-conpty.patch"
12+
# Hosted containers have no IPv6 route; keep upstream downloads on IPv4.
13+
python3 - "$bun_build_root/bun/.buildkite/Dockerfile" <<'PYDOCKER'
14+
from pathlib import Path
15+
import sys
16+
p = Path(sys.argv[1])
17+
s = p.read_text().replace('RUN apt-get update', 'RUN echo "inet4_only = on" >> /etc/wgetrc && echo "ipv4" >> /root/.curlrc && echo \'Acquire::ForceIPv4 "true";\' > /etc/apt/apt.conf.d/99-force-ipv4 && apt-get update', 1)
18+
p.write_text(s)
19+
PYDOCKER
1220
docker build --target base --tag bun-conpty-toolchain-base --file "$bun_build_root/bun/.buildkite/Dockerfile" "$bun_build_root/bun"
1321
docker build --tag bun-conpty-toolchain --file "$fixture_dir/Dockerfile" "$fixture_dir"
1422
for bun_target_arch in x64 arm64; do

0 commit comments

Comments
 (0)