PPTCopilot icon indicating copy to clipboard operation
PPTCopilot copied to clipboard

ERROR: failed to solve: process "/bin/sh -c sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list" did not complete successfully

Open zhenzi0322 opened this issue 1 year ago • 1 comments

➜ docker-compose up
Building pptcopilot-backend
[+] Building 1.8s (7/15)                                                                                                                                                            docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                          0.0s
 => => transferring dockerfile: 1.26kB                                                                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/golang:1.20                                                                                                                                1.5s
 => [ 1/11] FROM docker.io/library/golang:1.20@sha256:8f9af7094d0cb27cc783c697ac5ba25efdc4da35f8526db21f7aebb0b0b4f18a                                                                        0.0s
 => [internal] load build context                                                                                                                                                             0.0s
 => => transferring context: 6.25kB                                                                                                                                                           0.0s
 => CACHED [ 2/11] WORKDIR /home/tmp                                                                                                                                                          0.0s
 => ERROR [ 3/11] RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list                                                                                                   0.2s
------                                                                                                                                                                                             
 > [ 3/11] RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list:
0.204 sed: can't read /etc/apt/sources.list: No such file or directory
------
Dockerfile:6
--------------------
   4 |     # 安装mysql-client
   5 |     # 换源 
   6 | >>> RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
   7 |     #RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
   8 |     RUN apt-get update -y && apt-get install -y lsb-release
--------------------
ERROR: failed to solve: process "/bin/sh -c sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list" did not complete successfully: exit code: 2
ERROR: Service 'pptcopilot-backend' failed to build : Build failed

zhenzi0322 avatar May 31 '24 07:05 zhenzi0322

golang1:20 is updated to use debian 12, and the source.list should be /etc/apt/sources.list.d/debian.sources

sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources

LeighSu avatar Aug 11 '24 03:08 LeighSu