You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we currently copy the image file(s) for a virtual router before initiating the docker build. This is an optimization since the entire content of the docker build directory is sent in the build context to the docker engine. With multiple virtual machine images available locally, all of them will be sent for every invocation of the docker build. Thus, we instead copy the image to the docker/ directory and use that as our build context directory. This reduces the total amount of copying.
For example, in the most naive approach, with 3 images, say version 1, 2, 3 of virtual router FOO we would build three times (for ver 1, 2 & 3) and each time, all three images would be included in the docker build context. With a 1GB image, that is 33GB = 9GB copied. The current version instead does one copy + docker context send = 3(1GB+1GB) = 6GB.
We should be able to reduce this to 3GB by dynamically generating a dockerignore file. Thus we avoid the initial copy and instead send the local directory as the docker build context but ignore all the image files except the one we are building, thus 3*1GB = 3GB in total.
The text was updated successfully, but these errors were encountered:
So we currently copy the image file(s) for a virtual router before initiating the docker build. This is an optimization since the entire content of the docker build directory is sent in the build context to the docker engine. With multiple virtual machine images available locally, all of them will be sent for every invocation of the docker build. Thus, we instead copy the image to the
docker/
directory and use that as our build context directory. This reduces the total amount of copying.For example, in the most naive approach, with 3 images, say version 1, 2, 3 of virtual router FOO we would build three times (for ver 1, 2 & 3) and each time, all three images would be included in the docker build context. With a 1GB image, that is 33GB = 9GB copied. The current version instead does one copy + docker context send = 3(1GB+1GB) = 6GB.
We should be able to reduce this to 3GB by dynamically generating a dockerignore file. Thus we avoid the initial copy and instead send the local directory as the docker build context but ignore all the image files except the one we are building, thus 3*1GB = 3GB in total.
The text was updated successfully, but these errors were encountered: