赞
踩
使用
Dockerfile
制作镜像时,docker client
会发送Dockerfile
同级目录下的所有文件到docker daemon
(docker 守护进程),纯属浪费时间
Dockerfile
创建镜像时新建目录.dockerignore
文件,放到Dockerfile
文件所在目录下, 支持正则表达式语法.doctouch .dockerignore
vi .dockerignore
内容大概如下
./dic
./file*
./test
./xxx
./xxx.jar
再次docker build
就不会出现
Sending build context to Docker daemon的问题了
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。