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:
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:
-
Observe the Docker build failure during:
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:
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.
Bug Report:
make buildfails during Dockerapt-get updatedue to DNS resolution issuesDescribe the bug
The
make buildcommand documented insetup.mdhas been consistently failing during the Docker build step when runningapt-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-slimI was able to work around the issue by switching to:
FROM python:3.11-slim-bookwormRelevant Dockerfile reference:
vakra/docker/Dockerfile.unified
Line 26 in 0ef60d0
To Reproduce
Steps to reproduce the behavior:
Clone the repository:
git clone https://github.com/IBM/vakra.git cd vakraFollow the setup instructions from
setup.md.Run:
Observe the Docker build failure during:
Expected behavior
make buildshould 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-slimwith:
FROM python:3.11-slim-bookworm2. Test DNS resolution manually inside Docker
This succeeded, indicating the issue is related to Docker/container DNS resolution.
3. Configure Docker daemon DNS
After applying the above DNS configuration,
make buildsucceeded.