ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 使用 alpine:latest alpine是官方给出的最小的镜像,用于运行环境。 遇到的问题 ``` apk update && \ apk add --no-cache ca-certificates bash grep ``` fetch http://nl.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz error 解决办法加上参数 ` --network=host` ``` docker build --network=host -t . ``` 或者使用代理 ``` sudo docker build --build-arg http_proxy=http://proxyserver:8080 --build-arg https_proxy=https://proxyserver:8080 --file=dockerfile.txt --tag=myrep/image1 --rm=true . ```