rebuild docker image from specific step

后端 未结 7 1293
北荒
北荒 2020-12-23 12:50

I have the below Dockerfile.

FROM ubuntu:14.04
MAINTAINER Samuel Alexander 

RUN          


        
7条回答
  •  鱼传尺愫
    2020-12-23 12:56

    Another option is to delete the cached intermediate image you want to rebuild.

    Find the hash of the intermediate image you wish to rebuild in your build output:

    Step 27/42 : RUN lolarun.sh
     ---> Using cache
     ---> 328dfe03e436
    

    Then delete that image:

    $ docker image rmi 328dfe03e436
    

    Or if it gives you an error and you're okay with forcing it:

    $ docker image rmi -f 328dfe03e436
    

    Finally, rerun your build command, and it will need to restart from that point because it's not in the cache.

提交回复
热议问题