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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章