I am using docker to run an application but every time i need to update the application on production, i have to build on a new image locally, push/pull and run it on production, but the application is almost 5gb.
Is there a way to just push the changes, push them and then run the new image with the changes based on its previous image?
any help on this matter?
2
Answers
Whilst the other answers mention (in very specific language, btw) using the layer caching mechanism, they haven’t said how.
The important thing is to have the code that changes at the end of your Dockerfile. That way, later builds can use the cached layers that don’t change, and only rebuild (and push/pull) the layers with new stuff in.