mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-24 14:08:23 +00:00
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: https://github.com/overhangio/tutor-mfe/pull/163 https://docs.docker.com/reference/dockerfile/#add
This commit is contained in:
parent
41330ce448
commit
fc29241446
@ -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)
|
@ -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 "tutor@overhang.io" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user