forked from overhangio/tutor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cache edx-platform checkout in image build
Similar to what we need with the MFE image, we leverage Docker's ADD directive to implement caching of the edx-platform git checkout step. See: overhangio/tutor-mfe#163 https://docs.docker.com/reference/dockerfile/#add
- Loading branch information
Showing
2 changed files
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- 💥[Improvement] Ensure that the edx-platform repository git checkout is cached by Docker during image build. This means that the cache will automatically be cleared any time there is an upstream change. Thus, it is no longer necessary to run `tutor images build --no-cache` just to fetch the latest edx-platform changes. For this to work, any GitHub repository referenced by `EDX_PLATFORM_REPOSITORY` needs to end with ".git". Make sure that this is the case if you have modified the value of this setting in the past. (by @regisb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,9 @@ RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv | |
FROM minimal as code | ||
ARG EDX_PLATFORM_REPOSITORY={{ EDX_PLATFORM_REPOSITORY }} | ||
ARG EDX_PLATFORM_VERSION={{ EDX_PLATFORM_VERSION }} | ||
RUN mkdir -p /openedx/edx-platform && \ | ||
git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform | ||
RUN mkdir -p /openedx/edx-platform | ||
WORKDIR /openedx/edx-platform | ||
ADD --keep-git-dir=true $EDX_PLATFORM_REPOSITORY#$EDX_PLATFORM_VERSION . | ||
|
||
# Identify tutor user to apply patches using git | ||
RUN git config --global user.email "[email protected]" \ | ||
|