Ver Fonte

fix again

wuzj há 2 meses atrás
pai
commit
8e725fd8fc
1 ficheiros alterados com 9 adições e 1 exclusões
  1. 9 1
      Dockerfile

+ 9 - 1
Dockerfile

@@ -8,12 +8,20 @@ ENV GOPROXY=https://goproxy.cn,direct \
     GOARCH=amd64 \
     GO111MODULE=on
 
+# 配置Debian镜像源和DNS
+RUN echo 'deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib' > /etc/apt/sources.list && \
+    echo 'deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib' >> /etc/apt/sources.list && \
+    echo 'nameserver 8.8.8.8' > /etc/resolv.conf && \
+    echo 'nameserver 114.114.114.114' >> /etc/resolv.conf
+
 # 安装构建依赖
-RUN apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install -y --no-install-recommends \
     gcc \
     g++ \
     libsqlite3-dev \
     pkg-config \
+    ca-certificates \
+    && apt-get clean \
     && rm -rf /var/lib/apt/lists/*
 
 WORKDIR /app