Release.palm.master - Unable to build image Open edX

Hi,

I have installed the palm.master release.

tutor config printvalue OPENEDX_COMMON_VERSION
open-release/palm.master

The tutor images build openedx is giving the following errors:

=> ERROR [code 4/4] RUN curl -fsSL https://github.com/openedx/edx-platform/commit/b3e9f0cbd5e44f25a42a7cbf4929b71ef122b697.patch | git am

and

ERROR: failed to solve: process “/bin/sh -c curl -fsSL https://github.com/openedx/edx-platform/commit/b3e9f0cbd5e44f25a42a7cbf4929b71ef122b697.patch | git am” did not complete successfully: exit code: 128

Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:16.0.0 --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:16.0.0-cache /home/ubuntu/.local/share/tutor/env/build/openedx

More detail:

tutor$ tutor images build openedx
Building image docker.io/overhangio/openedx:16.0.0
docker buildx build --tag=docker.io/overhangio/openedx:16.0.0 --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:16.0.0-cache /home/ubuntu/.local/share/tutor/env/build/openedx
[+] Building 1.2s (22/63) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 11.74kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1.4 0.1s
=> CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc 0.0s
=> [internal] load metadata for Docker 0.1s
=> [internal] load metadata for docker.io/powerman/dockerize:0.19.0 0.1s
=> importing cache manifest from docker.io/overhangio/openedx:16.0.0-cache 0.3s
=> [internal] load build context 0.0s
=> => transferring context: 13.53kB 0.0s
=> FROM docker.io/powerman/dockerize:0.19.0@sha256:a34158d699e065609fc845e7cdc1e070f185afdbca317fe4931aaea04818f8bf 0.0s
=> [minimal 1/2] FROM Docker 0.0s
=> CACHED [minimal 2/2] RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,target=/var/lib/apt,sharing=locked apt update && apt install -y bui 0.0s
=> CACHED [python 1/4] RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,target=/var/lib/apt,sharing=locked apt update && apt install -y libssl-d 0.0s
=> CACHED [python 2/4] RUN git clone GitHub - pyenv/pyenv: Simple Python version management /opt/pyenv --branch v2.3.17 --depth 1 0.0s
=> CACHED [python 3/4] RUN /opt/pyenv/bin/pyenv install 3.8.15 0.0s
=> CACHED [python 4/4] RUN /opt/pyenv/versions/3.8.15/bin/python -m venv /openedx/venv 0.0s
=> CACHED [nodejs-requirements 1/4] RUN pip install nodeenv==1.7.0 0.0s
=> CACHED [nodejs-requirements 2/4] RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt 0.0s
=> CACHED [nodejs-requirements 3/4] WORKDIR /openedx/edx-platform 0.0s
=> CACHED [code 1/4] RUN mkdir -p /openedx/edx-platform && git clone GitHub - openedx/edx-platform: The Open edX LMS & Studio, powering education sites around the world! --branch open-release/palm.master --depth 1 /openedx/edx-platform 0.0s
=> CACHED [code 2/4] WORKDIR /openedx/edx-platform 0.0s
=> CACHED [code 3/4] RUN git config --global user.email “tutor@overhang.io” && git config --global user.name “Tutor” 0.0s
=> ERROR [code 4/4] RUN curl -fsSL https://github.com/openedx/edx-platform/commit/b3e9f0cbd5e44f25a42a7cbf4929b71ef122b697.patch | git am 0.5s

[code 4/4] RUN curl -fsSL https://github.com/openedx/edx-platform/commit/b3e9f0cbd5e44f25a42a7cbf4929b71ef122b697.patch | git am:
0.434 error: patch failed: openedx/core/djangoapps/catalog/management/commands/cache_programs.py:45
0.434 error: openedx/core/djangoapps/catalog/management/commands/cache_programs.py: patch does not apply
0.434 error: patch failed: openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py:48
0.434 error: openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py: patch does not apply
0.435 hint: Use ‘git am --show-current-patch’ to see the failed patch
0.435 Applying: enhancement: add support for caching programs for one site (#32380)
0.435 Patch failed at 0001 enhancement: add support for caching programs for one site (#32380)
0.435 When you have resolved this problem, run “git am --continue”.
0.435 If you prefer to skip this patch, run “git am --skip” instead.
0.435 To restore the original branch and stop patching, run “git am --abort”.


Dockerfile:50

48 | # added a patch for this commit (Enhancement: add support for caching programs for one site domain by Faraz32123 · Pull Request #32506 · openedx/edx-platform · GitHub)
49 | # which is fix for this issue (Error on running cache_programs command. · Issue #40 · overhangio/tutor-discovery · GitHub)
50 | >>> RUN curl -fsSL https://github.com/openedx/edx-platform/commit/b3e9f0cbd5e44f25a42a7cbf4929b71ef122b697.patch | git am
51 | # Patch edx-platform

52
ERROR: failed to solve: process "/bin/sh -c curl -fsSL https://github.com/openedx/edx-platform/commit/b3e9f0cbd5e44f25a42a7cbf4929b71ef122b697.patch
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:16.0.0 --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:16.0.0-cache /home/ubuntu/.local/share/tutor/env/build/openedx

The installation was successful but the issue is with image build.

Please help to identify and resolve the issue. Thanks

Check out this discussion.
I had the same problem and upgrading the docker version did it for me.

Thank You @sagar