忽略某些缓存层,重新构建镜像
$ docker build --help
Usage: docker build [OPTIONS] PATH | URL | -
Build an image from a Dockerfile
Options:
--add-host list Add a custom host-to-IP mapping (host:ip)
--build-arg list Set build-time variables
--cache-from strings Images to consider as cache sources # <==
例如 docker build --cache-from f5ab980f583d -t yourtag .
,指定从某一层起不再使用缓存,重新构建。