Our compiled app is large (> 1GB). I am using a command as follows to copy the application into the container:
COPY .\dist .\app
This is great, but the layer created is large.
I decided that I would create 2 docker files, a base docker file which would get run weekly and the main dockerfile. The base one would be the FROM of the main one.
So I have the COPY line above in both dockerfiles.
I was under the impression that this would result in an incremental copy of only the files that have changed between the base and the current. Which would result in much smaller layers.
But this doesn’t seem to be the case. Am I missing something or is it not supposed to work like this?