Search code examples
cachingdockerdockerfilefig

Prevent docker from creating image from cache


The issue I am having is I have made some configuration changes. I have a fig.yml file that starts up all of my docker images. So i changed necessary config files however when i do ./fig up it just recreates each docker image. What is the command that you can use to make docker rebuild the image without cache from a fig.yml file ? Any help would be greatly appreciated.


Solution

  • I think you may be looking for fig build. By default fig up will rebuild containers, but not images. This has been a source of confusion for a while.

    If you change a service's Dockerfile or the contents of its build directory, you can run fig build to rebuild [the image]. (source)