I ran into a small problem and whatever I do, I am unable to push the fix to my tutor installation.
I did use the following instructions in order to create an image with my fork:
tutor images build openedx
–build-arg EDX_PLATFORM_REPOSITORY=https://mygitrepo/edx-platform.git
–build-arg EDX_PLATFORM_VERSION=my-tag-or-branch
But then I needed to apply a fix to my fork and push it to Github. I made that change outside of Tutor obviously. Whatever I try afterwards, I am unable to build the images again because it keeps using the cache and therefore it doesn’t pickup my changes. That’s frustrating.
Is there a trick to rebuild the images based on my fork after I make a change to it?
The reason that @thinnguyen’s solution is working is that Docker is using its layer cache. The same EDX_PLATFORM_VERSION version number points to two different versions but Docker has no way to know about that.
After building the image, you do not have to run tutor local stop && tutor local start. Instead, you can simply run tutor local start -d and the new images will be picked up automatically.
From https://github.com/open-craft/edx-platform
* branch 03731f19459e558f188c06aac5cc9ca1bbc675c2 -> FETCH_HEAD
Auto-merging lms/djangoapps/discussion/tests/test_tasks.py
Auto-merging lms/djangoapps/discussion/tasks.py
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
On branch harshgaur14-dev
Your branch is up to date with 'origin/harshgaur14-dev'.
You are currently cherry-picking commit 03731f1.
(all conflicts fixed: run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
nothing to commit, working tree clean
The command '/bin/sh -c git fetch --depth=2 https://github.com/open-craft/edx-platform/ 03731f19459e558f188c06aac5cc9ca1bbc675c2 && git cherry-pick 03731f19459e558f188c06aac5cc9ca1bbc675c2' returned a non-zero code: 1
Error: Command failed with status 1: docker build -t docker.io/overhangio/openedx:13.2.2 --no-cache --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/Harshgaur14/edx-platform.git --build-arg EDX_PLATFORM_VERSION=harshgaur14-dev /root/.local/share/tutor/env/build/openedx