Openedx build fork repo build issue

@regis,

I am trying to build by custom edx-platform as suggested by running the

tutor images build openedx \
--build-arg EDX_PLATFORM_REPOSITORY=https://mygitrepo/edx-platform.git \
--build-arg EDX_PLATFORM_VERSION=my-tag-or-branch

the image is building fine and i able to see my changes by running

tutor local quickstart or start

But, Now I have make few commits to my git repo lets say some ui customizations and now i am trying to build the edx platform and trying to running it but I am not able to see those changes. Seems like same container is being taken.

Kindlly suggest what to do in this regards.

Are you using a different my-tag-or-branch for every release? If not, then Docker will consider that the layer has not changed and will load it from its cache, so the image will not be modified: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache

If this is the issue that you are facing, I suggest you run instead:

tutor images build openedx --no-cache \
--build-arg EDX_PLATFORM_REPOSITORY=https://mygitrepo/edx-platform.git \
--build-arg EDX_PLATFORM_VERSION=my-tag-or-branch
1 Like

@regis we are using the same tag name.

Thanks for the information very helpful.

Have a great day.

Hi @regis and @vsvvssrao,

When I run the command:

tutor images build openedx \
--build-arg EDX_PLATFORM_REPOSITORY=https://mygitrepo/edx-platform.git \
--build-arg EDX_PLATFORM_VERSION=my-tag-or-branch

the log still shows
Step 6/47 : ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git
It doesn’t use my repo to build images.
Please advise.
Thank you.

Regards,
Viet Tran

Hi @vsvvssrao,

Did you see the log using your git repo when you build images?

Regards,
Viet Tran

@viettn85 This is normal docker behaviour. The argument will be taken into account at step 9.

Hi @Regis,

I saw the log at step 9 but it seems there are some errors:

  • Cannot apply patches on dockerfile
  • Error when containers keep restarting forever (as someone posted)
  • Everytime I rebuild images (to change git repo, or change logo as your HOWTO topic using the default repo), I always get this:
    Error: Command failed with status 137: docker-compose -f /Users/viet_tran/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local exec lms sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s
    My Docker memory is 10GB. When I remove built images and load the default, it’s okay but cannot make any changes.
    Do you have any advise?

Thanks.

Hi @viettn85! We need to debug this step by step:

Cannot apply patches on dockerfile

What do you mean by that? What is the error log of tutor images build ...?

You need to determine which container is restarting, and what is the error log associated to this container. For instance, check the full error log of the lms with:

tutor logs -f lms

This is due to the fact that the lms container is not up and running. This should be solved once we address the second error above.