From da6ffdab2729f94fc3903545967bce89fb16b5e5 Mon Sep 17 00:00:00 2001 From: lexluo09 <39718951+lexluo09@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:01:06 +0800 Subject: [PATCH] (improvement)(project) Resolve the issue of failing to access external domain names from within the container. (#1305) --- docker/Dockerfile | 6 ++++++ docker/docker-compose.yml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index b07d86862..76e5c5bc6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,6 +17,12 @@ RUN apt-get update && \ apt-get install -y vim && \ rm -rf /var/lib/apt/lists/* +# Update the package list and install iputils-ping. +RUN apt-get update && apt-get install -y iputils-ping + +# 更新包列表并安装 dnsutils 包 +RUN apt-get update && apt-get install -y dnsutils + # Copy the supersonic standalone zip file into the container COPY assembly/build/supersonic-standalone-${SUPERSONIC_VERSION}.zip . diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f271de5bd..33dffdb16 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,6 +15,7 @@ services: networks: - supersonic_network dns: + - 114.114.114.114 - 8.8.8.8 - 8.8.4.4 @@ -36,6 +37,7 @@ services: fi " dns: + - 114.114.114.114 - 8.8.8.8 - 8.8.4.4 @@ -49,6 +51,7 @@ services: networks: - supersonic_network dns: + - 114.114.114.114 - 8.8.8.8 - 8.8.4.4 @@ -69,6 +72,7 @@ services: networks: - supersonic_network dns: + - 114.114.114.114 - 8.8.8.8 - 8.8.4.4