`make build` fails during Docker `apt-get update` due to DNS resolution issues
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- docker, python
- 領域
- build-system, devops
調査の方向性
docker/Dockerfile.unified の 26 行目付近から始め、現在の python:3.11-slim ベースイメージと報告されている bookworm バリアントを比較します。setup.md の手順と make build を使って失敗を再現し、その後、選択したベースイメージの変更によって、Docker の DNS を手動で設定しなくても apt-get update が完了することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Bug Report: make build fails during Docker apt-get update due to DNS resolution issues
Describe the bug
The make build command documented in setup.md has been consistently failing during the Docker build step when running apt-get update.
The failure appears to be related to DNS resolution inside the Docker container while attempting to reach Debian package repositories (deb.debian.org).
This issue has been reproducible across three separate VMs with Linux OS.
The failing step is:
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc curl \
&& rm -rf /var/lib/apt/lists/*
The issue seems to originate from the base image currently used in the Dockerfile:
FROM python:3.11-slim
I was able to work around the issue by switching to:
FROM python:3.11-slim-bookworm
Relevant Dockerfile reference:
To Reproduce
Steps to reproduce the behavior:
-
Clone the repository:
git clone https://github.com/IBM/vakra.git cd vakra -
Follow the setup instructions from
setup.md. -
Run:
make build -
Observe the Docker build failure during:
apt-get update
Expected behavior
make build should complete successfully without requiring manual Docker DNS configuration or modification of the base image.
Screenshots
Additional context
I tested this on three different VMs and encountered the same issue consistently.
Temporary workaround that resolved the issue:
1. Change the base image
Replace:
FROM python:3.11-slim
with:
FROM python:3.11-slim-bookworm
2. Test DNS resolution manually inside Docker
docker run --rm --dns 8.8.8.8 python:3.11-slim-bookworm getent hosts deb.debian.org
This succeeded, indicating the issue is related to Docker/container DNS resolution.
3. Configure Docker daemon DNS
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<'EOF'
{
"dns": ["8.8.8.8", "1.1.1.1"]
}
EOF
sudo systemctl restart docker
After applying the above DNS configuration, make build succeeded.
- 主要言語
- Python
- スター
- 79
- フォーク
- 23
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IBM/vakra のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
future-agi/future-agi#5908 ·
メンテナーはふだん 1 日以内に返信
-
Placeholder export disables HTML image input for picture description対応中かも @cloudiful が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
docling-project/docling-serve#817 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Techiebutler/freeframe#687 ·
メンテナーはふだん 1 日以内に返信
-
Parse truncated verbose GC logs up to the first XML error対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug verbose GC
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
IBM/javacore-analyser#677 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信