Closed natea closed 6 years ago
Hmmm... There is no easy fix that will allow you both to frequently update the edx-platform code and quickly re-build the image. I suggest you tag the git revisions from the natea/testing
branch (git tag mytag
) and fetch the corresponding tags by replacing --branch natea/testing
with --branch mytag
. (the --branch
option supports tags, too)
This will allow you to rebuild the image with the appropriate revision, but rebuilding the image will take long every time you change the repo revision.
Alternatively, if the new requirements do not impact the build, you can add the following instruction at the bottom of the Dockerfile:
RUN git fetch origin && git checkout mytag && pip install -r requirements/appsembler.txt
Thus, all previous instructions will be cached.
I will be testing this method shortly (but right now I am in the middle of rebuilding my images).
Could we not just use docker-compose run
? https://docs.docker.com/compose/reference/run/
Well you're right that you could re-install the xblock every time the image is run, but that is quite inconvenient.
I was thinking of the OP
I wanted to test out a new XBlock
If anything is changed it really should be in the image.
I wanted to test out a new XBlock, so I added a new file to the requirements/edx directory: https://github.com/natea/edx-platform/blob/natea/testing/requirements/edx/appsembler.txt
And changed these lines in the Dockerfile:
When I run
make build
, it sees that it has already checked outedx-platform
and it doesn't pip install the new requirements file.I have to run
docker-compose build --no-cache lms cms
in order for force a rebuild of the entire image. Is there an easier / faster way to do this?