Closed 95-martin-orion closed 4 years ago
Added @s-mandra and @alankao64 for feedback on this. One issue with the second strategy is that I don't know of a good way to perform step (4); when I tried this originally, I copied the changes out manually.
The best approach to fix this would be to pinpoint which files to COPY
in Dockerfile so that only the relevant layers are updated if some files are missing. Right now, in the most inner layer qflex
, we copy everything as COPY ./ /qflex
. Therefore, any change in the folder ./
triggers the update of qflex
and therefore the recompilation of all layers. This is something I was already thinking about, but it needs some work ..
The examples requested here are largely unnecessary now - the above changes allow docker-compose up --build
to run just about as fast as a normal make
would.
Currently, the process for building and testing changes to qFlex with Docker (e.g. when working on a Mac) looks like this:
docker-compose up --build
(takes X minutes) 2a. If all tests pass, you're done.The bottleneck here is rebuilding the Docker container, even with something like #198 to speed things up. A faster build/test cycle looks like this:
docker-compose up --build
(takes X minutes) 2a. If all tests pass, you're done.${COMMAND_TBD}
3a. For issues seen in the previous test run, apply fixes inside the docker container. 3b. Run tests from inside the container usingmake run-tests
(takes XX seconds) 3c. If any tests fail, return to (3a).We should either add an example of how to enter the docker container, or update existing examples/Dockerfiles to enter the container (similar to the current rootless-container examples).