How to prevent Dockerfile caching git clone

后端 未结 7 553
忘了有多久
忘了有多久 2020-11-30 08:19

I have a Dockerfile trying to package and deploy a web app to a container. The code of app fetches from git repository during Docker image building. Here\'s the Dockerfile s

相关标签:
7条回答
  • 2020-11-30 09:12

    I ran into this same issue myself, and I just decided to use the --no-cache option when I build the image, rather than trying to single out the git repo.

    docker build --no-cache -t my_image .
    
    0 讨论(0)
提交回复
热议问题