Remove all third-party apt sources before apt-get update

The Playwright image ships with NodeSource, GitHub CLI, and other
third-party apt sources that all time out from Iran. rm -rf the
entire sources.list.d directory, then add back only the local
Ubuntu mirror (ubuntu.parsvds.com).

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-08-04 23:28:57 +03:30
parent ad894eca2f
commit d08a67141a
+4 -4
View File
@@ -59,10 +59,10 @@ CMD ["python", "main.py", "admin"]
FROM oci.reg.darano.ir/mcr.microsoft.com/playwright:v1.62.0-noble AS worker FROM oci.reg.darano.ir/mcr.microsoft.com/playwright:v1.62.0-noble AS worker
# Remove NodeSource apt source (times out from Iran) before anything else. # Remove ALL third-party apt sources before running apt-get update.
RUN rm -f /etc/apt/sources.list.d/nodesource.list \ # The Playwright image ships with NodeSource, GitHub CLI, etc. that
&& rm -f /etc/apt/sources.list.d/nodesource.sources \ # all time out from our VPS location (Iran). Only keep Ubuntu repos.
&& rm -f /etc/apt/keyrings/nodesource.gpg RUN rm -rf /etc/apt/sources.list.d/*
# Install Python 3.12 + uv, then sync deps — all in one RUN. # Install Python 3.12 + uv, then sync deps — all in one RUN.
# Use a mirror for apt since the VPS has network restrictions (Iran). # Use a mirror for apt since the VPS has network restrictions (Iran).