ETIMEDOUT error when installing Central

1. What is the issue? Please be detailed.
I have an error during installation of ODK Central instance. Ran sudo docker compose build and everything was going on fine till the command: [nginx stage-1 2/8] RUN apt-get update && apt-get install -y netcat-openbsd. The problem is there is no log file to give details about the same issue. I looked into the directory /root/.npm/_logs/ and there is no log file as suggested in the screenshot below.

My server has 8GB RAM and 250GB HD, this means the issue is not related to RAM or storage. I have had this problem from Friday, last week.

2. What steps can we take to reproduce this issue?
I am not sure if reinstalling the instance could produce the same error that I have. I did install another instance in early November 2023 and everything went on smoothly. This earlier instance is working well as my test environment. Could it be possible that there is someone else having a similar issue? Especially those with recent installations, as recent as two weeks ago?

3. What have you tried to fix the issue?
I tried to run sudo docker run apt-get update && apt-get install -y netcat-openbsd but did not manage to install netcat-openbsd. This should work but it didn't but atleast provided a possible cause of the error.

4. Upload any forms or screenshots you can share publicly below.
initial error

after running sudo docker run apt-get update && apt-get install -y netcat-openbsd

The initial error from the build says you have a network connectivity problem. Any chance you have an unreliable or firewalled connection? Maybe try a reboot.

Thanks @yanokwa for the reply. I will investigate if the firewall is blocking this specific action because the problem might not be unstable internet. I have repeatedly run sudo docker compose build command and should have passed this point if internet was the issue.
I think you might be right about firewall.

You were right. Firewalls have been blocking the server from downloading some of the pre-requisites. It is surprising that my firewall discriminately blocks certain services.