Skip to content

Use apt mirrors when building the Docker image#16091

Closed
nineinchnick wants to merge 1 commit intotrinodb:masterfrom
nineinchnick:docker-apt-mirrors
Closed

Use apt mirrors when building the Docker image#16091
nineinchnick wants to merge 1 commit intotrinodb:masterfrom
nineinchnick:docker-apt-mirrors

Conversation

@nineinchnick
Copy link
Member

Description

In the last few weeks, we've seen failures in the job that builds the Docker image where it couldn't connect to ports.ubuntu.com. Adding mirrors to apt should make it more resilient against such failures.

I chose these two mirrors by getting a list of mirrors that include ports using this: https://askubuntu.com/questions/428698/are-there-alternative-repositories-to-ports-ubuntu-com-for-arm
and then checking which ones are the fastest using netselect, executed on an ec2 instance in us-east-2:

$ sudo netselect -v -s10 -t20 $(cat valid.txt )
Running netselect to choose 10 out of 14 addresses.      
............................................................................................................................................................................................................................
    0 http://mirrors-ca.muzzy.us/ubuntu/
  173 http://mirrors.ocf.berkeley.edu/ubuntu-ports/
  417 http://mirror.kumi.systems/ubuntu-ports/
  621 http://jp.mirror.coganng.com/ubuntu-ports/
  716 http://mirror.deace.id/ubuntu/
 1134 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/
 1155 http://ubuntu-mirror.cloud.mu/ubuntu-ports/
 1281 http://mirror.misakamikoto.network/ubuntu-ports/
 1460 http://in.mirror.coganng.com/ubuntu-ports/
 1550 http://mirror.nishi.network/ubuntu-ports/

Out of these, the first one is invalid as it doesn't work over http, returning a 403.

Additional context and related issues

This is related to #15840

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Feb 13, 2023
@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Feb 13, 2023

Use --add-host "ports.ubuntu.com:127.0.0.1" --add-host "archive.ubuntu.com:127.0.0.1" like in MiguelWeezardo#14 to make sure your solution works even when Ubuntu repos are down.

@MiguelWeezardo
Copy link
Member

Integrated your findings with work branch MiguelWeezardo#14 and merging to Trino as #16098

@nineinchnick nineinchnick deleted the docker-apt-mirrors branch May 27, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants