ERPNext V15 with docker

Hi
I am trying ERPNext V15 by using this guide by @Antony_Praveenkumar

https://discuss.frappe.io/t/tutorial-docker-installing-erpnext-15-on-docker-a-step-by-step-guide-production/111731

I did the export

declare -x APPS_JSON=$'[\n  {\n    "url": "https://github.com/frappe/erpnext",\n    "branch": "version-15"\n  }\n]'
declare -x APPS_JSON_BASE64="WyB7ICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9lcnBuZXh0IiwgImJyYW5jaCI6ICJ2ZXJzaW9uLTE1IiB9IF0K"

and I modified the docker build version numbers to suite those on my Ubuntu24.04

sudo docker build   --build-arg=FRAPPE_PATH=https://github.com/frappe/frappe   --build-arg=FRAPPE_BRANCH=v15.0.0   --build-arg=PYTHON_VERSION=3.12.7   --build-arg=NODE_VERSION=22.14.0   --build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64   --tag=customapp:1.0.0   --file=images/custom/Containerfile .

but the build is failing

 => CACHED [builder 1/3] RUN apt-get update     && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y     wget     lib  0.0s
 => CACHED [builder 2/3] RUN if [ -n "WyB7ICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9lcnBuZXh0IiwgImJyYW5jaCI6ICJ2ZXJzaW9uLTE1IiB9IF0K" ]  0.0s
 => ERROR [builder 3/3] RUN export APP_INSTALL_ARGS="" &&   if [ -n "WyB7ICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9lcnBuZXh0IiwgImJyYW5  29.4s
------
 > [builder 3/3] RUN export APP_INSTALL_ARGS="" &&   if [ -n "WyB7ICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9lcnBuZXh0IiwgImJyYW5jaCI6ICJ2ZXJzaW9uLTE1IiB9IF0K" ]; then     export APP_INSTALL_ARGS="--apps_path=/opt/frappe/apps.json";   fi &&   bench init ${APP_INSTALL_ARGS}    --frappe-branch=v15.0.0     --frappe-path=https://github.com/frappe/frappe     --no-procfile     --no-backups     --skip-redis-config-generation     --verbose     /home/frappe/frappe-bench &&   cd /home/frappe/frappe-bench &&   echo "{}" > sites/common_site_config.json &&   find apps -mindepth 1 -path "*/.git" | xargs rm -fr:
0.562 Setting Up Environment
0.666 $ python3 -m venv env
5.584 $ /home/frappe/frappe-bench/env/bin/python -m pip install  --upgrade pip
6.371 Requirement already satisfied: pip in ./env/lib/python3.12/site-packages (24.2)
6.626 Collecting pip
6.701   Downloading pip-25.0.1-py3-none-any.whl.metadata (3.7 kB)
6.727 Downloading pip-25.0.1-py3-none-any.whl (1.8 MB)
6.800    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 63.4 MB/s eta 0:00:00
6.837 Installing collected packages: pip
6.838   Attempting uninstall: pip
6.844     Found existing installation: pip 24.2
6.909     Uninstalling pip-24.2:
6.920       Successfully uninstalled pip-24.2
8.811 Successfully installed pip-25.0.1
9.243 $ /home/frappe/frappe-bench/env/bin/python -m pip install  wheel
10.23 Collecting wheel
10.31   Downloading wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)
10.33 Downloading wheel-0.45.1-py3-none-any.whl (72 kB)
10.40 Installing collected packages: wheel
10.58 Successfully installed wheel-0.45.1
11.20 Getting frappe
11.20 $ git clone https://github.com/frappe/frappe --branch v15.0.0 --depth 1 --origin upstream
11.20 Cloning into 'frappe'...
14.01 Note: switching to 'b8c1f492c492f7cbbfd3cc768234fbb244fd3737'.
14.01
14.01 You are in 'detached HEAD' state. You can look around, make experimental
14.01 changes and commit them, and you can discard any commits you make in this
14.01 state without impacting any branches by switching back to a branch.
14.01
14.01 If you want to create a new branch to retain commits you create, you may
14.01 do so (now or later) by using -c with the switch command. Example:
14.01
14.01   git switch -c <new-branch-name>
14.01
14.01 Or undo this operation with:
14.01
14.01   git switch -
14.01
14.01 Turn off this advice by setting config variable advice.detachedHead to false
14.01
14.51 Installing frappe
14.51 $ /home/frappe/frappe-bench/env/bin/python -m pip install  --upgrade -e /home/frappe/frappe-bench/apps/frappe
15.39 Obtaining file:///home/frappe/frappe-bench/apps/frappe
15.40   Installing build dependencies: started
16.75   Installing build dependencies: finished with status 'done'
16.75   Checking if build backend supports build_editable: started
16.99   Checking if build backend supports build_editable: finished with status 'done'
16.99   Getting requirements to build editable: started
17.28   Getting requirements to build editable: finished with status 'done'
17.28   Preparing editable metadata (pyproject.toml): started
17.57   Preparing editable metadata (pyproject.toml): finished with status 'done'
17.73 Collecting Babel~=2.12.1 (from frappe==15.0.0)
17.83   Downloading Babel-2.12.1-py3-none-any.whl.metadata (1.3 kB)
17.91 Collecting Click~=8.1.7 (from frappe==15.0.0)
17.92   Downloading click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
17.99 Collecting filelock~=3.8.0 (from frappe==15.0.0)
18.00   Downloading filelock-3.8.2-py3-none-any.whl.metadata (2.3 kB)
18.04 Collecting filetype~=1.2.0 (from frappe==15.0.0)
18.05   Downloading filetype-1.2.0-py2.py3-none-any.whl.metadata (6.5 kB)
18.15 Collecting GitPython~=3.1.34 (from frappe==15.0.0)
18.15   Downloading GitPython-3.1.44-py3-none-any.whl.metadata (13 kB)
18.22 Collecting Jinja2~=3.1.2 (from frappe==15.0.0)
18.23   Downloading jinja2-3.1.5-py3-none-any.whl.metadata (2.6 kB)
18.59 Collecting Pillow~=10.0.0 (from frappe==15.0.0)
18.59   Downloading Pillow-10.0.1-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (9.5 kB)
18.67 Collecting PyJWT~=2.8.0 (from frappe==15.0.0)
18.68   Downloading PyJWT-2.8.0-py3-none-any.whl.metadata (4.2 kB)
18.73 Collecting PyMySQL==1.1.0 (from frappe==15.0.0)
18.74   Downloading PyMySQL-1.1.0-py3-none-any.whl.metadata (4.4 kB)
18.81 Collecting pypdf~=3.15.4 (from frappe==15.0.0)
18.82   Downloading pypdf-3.15.5-py3-none-any.whl.metadata (7.1 kB)
18.89 Collecting PyPika~=0.48.9 (from frappe==15.0.0)
18.90   Downloading PyPika-0.48.9.tar.gz (67 kB)
18.94   Installing build dependencies: started
22.18   Installing build dependencies: finished with status 'done'
22.18   Getting requirements to build wheel: started
22.57   Getting requirements to build wheel: finished with status 'done'
22.57   Preparing metadata (pyproject.toml): started
23.06   Preparing metadata (pyproject.toml): finished with status 'done'
23.09 Collecting PyQRCode~=1.2.1 (from frappe==15.0.0)
23.10   Downloading PyQRCode-1.2.1.zip (41 kB)
23.12   Installing build dependencies: started
26.34   Installing build dependencies: finished with status 'done'
26.34   Getting requirements to build wheel: started
26.80   Getting requirements to build wheel: finished with status 'done'
26.80   Preparing metadata (pyproject.toml): started
27.26   Preparing metadata (pyproject.toml): finished with status 'done'
27.34 Collecting PyYAML~=6.0.1 (from frappe==15.0.0)
27.35   Downloading PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
27.41 INFO: pip is looking at multiple versions of frappe to determine which version is compatible with other requirements. This could take a while.
27.41 ERROR: Ignored the following yanked versions: 3.6.0a1
27.41 ERROR: Could not find a version that satisfies the requirement RestrictedPython~=6.2 (from frappe) (from versions: 3.4.2, 3.4.3, 3.5.0, 3.5.1, 3.5.2, 3.6.0, 4.0a1, 4.0a2, 4.0a3, 4.0b1, 4.0b2, 4.0b3, 4.0b4, 4.0b5, 4.0b6, 4.0b7, 4.0b8, 4.0, 5.0, 7.0a1.dev0, 7.0a1.dev1, 7.0a2.dev0, 7.0, 7.1, 7.2a1.dev0, 7.2, 7.3, 7.4, 8.0)
27.49 ERROR: No matching distribution found for RestrictedPython~=6.2
28.78 subprocess.CalledProcessError: Command '/home/frappe/frappe-bench/env/bin/python -m pip install  --upgrade -e /home/frappe/frappe-bench/apps/frappe ' returned non-zero exit status 1.
28.78
28.78 The above exception was the direct cause of the following exception:
28.78
28.78 Traceback (most recent call last):
28.78   File "/usr/local/lib/python3.12/site-packages/bench/commands/make.py", line 75, in init
28.78     init(
28.78   File "/usr/local/lib/python3.12/site-packages/bench/utils/render.py", line 105, in wrapper_fn
28.78     return fn(*args, **kwargs)
28.78            ^^^^^^^^^^^^^^^^^^^
28.78   File "/usr/local/lib/python3.12/site-packages/bench/utils/system.py", line 87, in init
28.78     get_app(
28.78   File "/usr/local/lib/python3.12/site-packages/bench/app.py", line 778, in get_app
28.78     app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
28.78   File "/usr/local/lib/python3.12/site-packages/bench/utils/render.py", line 126, in wrapper_fn
28.78     return fn(*args, **kwargs)
28.78            ^^^^^^^^^^^^^^^^^^^
28.78   File "/usr/local/lib/python3.12/site-packages/bench/app.py", line 253, in install
28.78     install_app(
28.78   File "/usr/local/lib/python3.12/site-packages/bench/app.py", line 912, in install_app
28.78     bench.run(
28.78   File "/usr/local/lib/python3.12/site-packages/bench/bench.py", line 48, in run
28.78     return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
28.78            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28.78   File "/usr/local/lib/python3.12/site-packages/bench/utils/__init__.py", line 181, in exec_cmd
28.78     raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
28.78 bench.exceptions.CommandFailedError: /home/frappe/frappe-bench/env/bin/python -m pip install  --upgrade -e /home/frappe/frappe-bench/apps/frappe
28.78
28.78 ERROR: There was a problem while creating /home/frappe/frappe-bench
28.78 Do you want to rollback these changes? [y/N]: Aborted!
------
Containerfile:117
--------------------
 116 |     ARG FRAPPE_PATH=https://github.com/frappe/frappe
 117 | >>> RUN export APP_INSTALL_ARGS="" && \
 118 | >>>   if [ -n "${APPS_JSON_BASE64}" ]; then \
 119 | >>>     export APP_INSTALL_ARGS="--apps_path=/opt/frappe/apps.json"; \
 120 | >>>   fi && \
 121 | >>>   bench init ${APP_INSTALL_ARGS}\
 122 | >>>     --frappe-branch=${FRAPPE_BRANCH} \
 123 | >>>     --frappe-path=${FRAPPE_PATH} \
 124 | >>>     --no-procfile \
 125 | >>>     --no-backups \
 126 | >>>     --skip-redis-config-generation \
 127 | >>>     --verbose \
 128 | >>>     /home/frappe/frappe-bench && \
 129 | >>>   cd /home/frappe/frappe-bench && \
 130 | >>>   echo "{}" > sites/common_site_config.json && \
 131 | >>>   find apps -mindepth 1 -path "*/.git" | xargs rm -fr
 132 |
--------------------
ERROR: failed to solve: process "/bin/sh -c export APP_INSTALL_ARGS=\"\" &&   if [ -n \"${APPS_JSON_BASE64}\" ]; then     export APP_INSTALL_ARGS=\"--apps_path=/opt/frappe/apps.json\";   fi &&   bench init ${APP_INSTALL_ARGS}    --frappe-branch=${FRAPPE_BRANCH}     --frappe-path=${FRAPPE_PATH}     --no-procfile     --no-backups     --skip-redis-config-generation     --verbose     /home/frappe/frappe-bench &&   cd /home/frappe/frappe-bench &&   echo \"{}\" > sites/common_site_config.json &&   find apps -mindepth 1 -path \"*/.git\" | xargs rm -fr" did not complete successfully: exit code: 1

Would appreciate some assistance

which version of python are you using?

Try this

docker build \
  --build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
  --build-arg=FRAPPE_BRANCH=v15.0.0 \
  --build-arg=PYTHON_VERSION=3.10.13 \
  --build-arg=NODE_VERSION=18.18.2 \
  --build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
  --tag=customapp:1.0.0 \
  --file=images/custom/Containerfile .

Try with PYTHON_VERSION=3.10.13 or PYTHON_VERSION=3.11.6

Thank you for your message @Antony_Praveenkumar

Let me try that. For this effort , I used Ubuntu 24.04.
Perhaps I should use Ubuntu 22.04. If I remember correctly, 22.04 has pythin 3.10 ?

Let me try that…