rover 环境搭建

in wsl

先更新

apt update  &&、

apt install –y llvm && \

apt install -y clang && \

apt-get install -y gcc-multilib &&、

./docker/docker Dockerfile
apt update && \
    git clone --depth 1 --branch v0.8.0 https://github.com/libbpf/libbpf.git && \
    mkdir -p /usr/include/bpf && cp libbpf/src/*.h /usr/include/bpf && \
    apt install -y lsb-release wget software-properties-common libc6-dev-i386 && \
    cp -rf /usr/include/asm-generic/* /usr/include/asm && \
    wget https://apt.llvm.org/llvm.sh && \
    chmod +x llvm.sh && \
    ./llvm.sh 13

错误

ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/eclipse-temurin/manifests/11-jre": dial tcp 52.1.184.176:443: i/o timeout

解决:https://stackoverflow.com/questions/72194704/failed-to-solve-with-frontend-dockerfile-v0-failed-to-create-llb-definition-fa

镜像编译失败 , 换到 中国源


FROM golang:1.18

RUN echo '#http://mirrors.163.com/debian/为软件源也可以为其他的 bullseye为版本代号 main non-free contrib区别如下  \n\
          deb http://mirrors.163.com/debian/ bullseye main non-free contrib\n\
          deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib\n\
          deb http://mirrors.163.com/debian/ bullseye-backports main non-free contrib\n\
          deb-src http://mirrors.163.com/debian/ bullseye main non-free contrib\n\
          deb-src http://mirrors.163.com/debian/ bullseye-updates main non-free contrib\n\
          deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib\n\
          #deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib\n\
          #deb http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib\n\
          #deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib\n\
          #deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib\n\
          deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib\n\
          deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib\n\
    ' > /etc/apt/sources.list
#换成中国源
RUN go env -w GO111MODULE=on && go env -w  GOPROXY=https://goproxy.cn,direct

posted @ 2023-03-20 15:02  张保维  阅读(30)  评论(0编辑  收藏  举报