Skip to content

Commit 4d72687

Browse files
committed
CI: pin Docker daemon DNS before building base image
The base-image build fails inside the daemon's default bridge network with 'Could not resolve archive.ubuntu.com', causing apt-get to skip every package. Configure /etc/docker/daemon.json with public resolvers (8.8.8.8, 1.1.1.1) and restart the daemon so the build container can reach Ubuntu mirrors.
1 parent 0775eb2 commit 4d72687

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/wasm-spike.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ jobs:
7171
echo "release=$RELEASE" >> "$GITHUB_OUTPUT"
7272
echo "Resolved PHP ${{ matrix.php }} -> $RELEASE"
7373
74+
- name: Configure Docker DNS
75+
run: |
76+
# GitHub-hosted runners occasionally have a Docker daemon whose
77+
# default bridge network can't resolve archive.ubuntu.com. Pin
78+
# explicit public resolvers so apt-get inside the base image build
79+
# can reach the Ubuntu mirrors.
80+
echo '{"dns": ["8.8.8.8", "1.1.1.1"]}' | sudo tee /etc/docker/daemon.json
81+
sudo systemctl restart docker
82+
# Wait for Docker to come back up.
83+
for i in 1 2 3 4 5 6 7 8 9 10; do
84+
if docker info >/dev/null 2>&1; then break; fi
85+
sleep 2
86+
done
87+
7488
- name: Build playground-php-wasm:base image
7589
working-directory: wordpress-playground/packages/php-wasm/compile
7690
run: make base-image

0 commit comments

Comments
 (0)