ERPNext-14 Production Setup, Custom Image Issue?

@revant_one
I try to create my custom app but i can’t please let me know why I can’t able to create the custom image. I need hrms module and payments module as well.

APPS_JSON

export APPS_JSON='[
  {
    "url": "https://github.com/frappe/erpnext",
    "branch": "v14.24.1"
  },
  {
    "url": "https://github.com/frappe/hrms",
    "branch": "version-14"
  },
  {
    "url": "https://github.com/frappe/payments",
    "branch": "version-14"
  },
  {
    "url": "https://access_token@github.com/username/custom_app.git",
    "branch": "staging-14"
  }

]'

APPS_JSON_BASE64

export APPS_JSON_BASE64=$(echo ${APPS_JSON} | base64 -w 0)

Custom Image

docker build \
  --build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
  --build-arg=FRAPPE_BRANCH=v14.24.2 \
  --build-arg=PYTHON_VERSION=3.10.11 \
  --build-arg=NODE_VERSION=16.16.0 \
  --build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
  --tag=customapp:1.0.0 \
  --file=images/custom/Containerfile .

After try to take the build im getting this error

docker build \
  --build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
  --build-arg=FRAPPE_BRANCH=v14.24.2 \
  --build-arg=PYTHON_VERSION=3.10.11 \
  --build-arg=NODE_VERSION=16.16.0 \
  --build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
  --tag=customapp:1.0.0 \
  --file=images/custom/Containerfile .
[+] Building 262.9s (11/13)                                                        
 => [internal] load .dockerignore                                             0.0s
 => => transferring context: 83B                                              0.0s
 => [internal] load build definition from Containerfile                       0.0s
 => => transferring dockerfile: 4.63kB                                        0.0s
 => [internal] load metadata for docker.io/library/python:3.10.11-slim-bull  12.6s
 => [base 1/4] FROM docker.io/library/python:3.10.11-slim-bullseye@sha256:1  11.3s
 => => resolve docker.io/library/python:3.10.11-slim-bullseye@sha256:12af6fa  0.0s
 => => sha256:9e3ea8720c6de96cc9ad544dddc695a3ab73f5581c5 31.40MB / 31.40MB  10.4s
 => => sha256:fe9f5cfcf49b03ec591210966a6e78b0cee3d61048a1b6 1.08MB / 1.08MB  1.0s
 => => sha256:76b1f1a2fcefd08b73d99ff2d2195ac182a707c635f0 11.54MB / 11.54MB  6.4s
 => => sha256:12af6fa557c55d85754107e59d0e21530d7a253757e128 1.65kB / 1.65kB  0.0s
 => => sha256:79aa96a96eeccf6e13a240f24c8630dc1069efd20f8c28 1.37kB / 1.37kB  0.0s
 => => sha256:bacfe83220341f3d433baaa5a3fe54bf7204f2c034fd4b 6.83kB / 6.83kB  0.0s
 => => sha256:d573939d7fe2ac32f15ff6df02e81ef7aea05a9ad93708f3e1 243B / 243B  1.3s
 => => sha256:1845366489108f686ae34f1b0d0f149c3838534960ac2b 3.37MB / 3.37MB  2.4s
 => => extracting sha256:9e3ea8720c6de96cc9ad544dddc695a3ab73f5581c5d954e050  0.5s
 => => extracting sha256:fe9f5cfcf49b03ec591210966a6e78b0cee3d61048a1b602e15  0.0s
 => => extracting sha256:76b1f1a2fcefd08b73d99ff2d2195ac182a707c635f086bffd9  0.2s
 => => extracting sha256:d573939d7fe2ac32f15ff6df02e81ef7aea05a9ad93708f3e11  0.0s
 => => extracting sha256:1845366489108f686ae34f1b0d0f149c3838534960ac2b93a35  0.1s
 => [internal] load build context                                             0.0s
 => => transferring context: 4.89kB                                           0.0s
 => [base 2/4] COPY resources/nginx-template.conf /templates/nginx/frappe.co  0.1s
 => [base 3/4] COPY resources/nginx-entrypoint.sh /usr/local/bin/nginx-entry  0.0s
 => [base 4/4] RUN useradd -ms /bin/bash frappe     && apt-get update       178.1s
 => [builder 1/3] RUN apt-get update     && DEBIAN_FRONTEND=noninteractive   40.3s
 => [builder 2/3] RUN if [ -n "WyB7ICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyY  0.3s 
 => ERROR [builder 3/3] RUN export APP_INSTALL_ARGS="" &&   if [ -n "WyB7IC  20.2s 
------                                                                             
 > [builder 3/3] RUN export APP_INSTALL_ARGS="" &&   if [ -n "WyB7ICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9lcnBuZXh0IiwgImJyYW5jaCI6ICJ2MTQuMjQuMSIgfSwgeyAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9mcmFwcGUvaHJtcyIsICJicmFuY2giOiAidmVyc2lvbi0xNCIgfSwgeyAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9mcmFwcGUvcGF5bWVudHMiLCAiYnJhbmNoIjogInZlcnNpb24tMTQiIH0sIHsgInVybCI6ICJodHRwczovL2docF8xT3VobGFYRXVoZHlIMjZqNVoyWTJlUEdyQUttQ08wckNncENAZ2l0aHViLmNvbS90aGlydWstc29mdHN1YXZlL3NzX2N1c3RvbV9lcnBuZXh0LmdpdCIsICJicmFuY2giOiAic3RhZ2luZy0xNCIgfSBdCg==" ]; then     export APP_INSTALL_ARGS="--apps_path=/opt/frappe/apps.json";   fi &&   bench init ${APP_INSTALL_ARGS}    --frappe-branch=v14.24.2     --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 0.353 Setting Up Environment
#0 0.379 $ python3 -m venv env
#0 2.169 $ /home/frappe/frappe-bench/env/bin/python -m pip install  --upgrade pip
#0 2.345 Requirement already satisfied: pip in ./env/lib/python3.10/site-packages (23.0.1)
#0 5.501 Collecting pip
#0 10.70   Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)
#0 11.57      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 2.4 MB/s eta 0:00:00
#0 11.60 Installing collected packages: pip
#0 11.60   Attempting uninstall: pip
#0 11.60     Found existing installation: pip 23.0.1
#0 11.70     Uninstalling pip-23.0.1:
#0 11.70       Successfully uninstalled pip-23.0.1
#0 12.28 Successfully installed pip-23.1.2
#0 12.39 $ /home/frappe/frappe-bench/env/bin/python -m pip install  wheel
#0 12.65 Collecting wheel
#0 12.74   Downloading wheel-0.40.0-py3-none-any.whl (64 kB)
#0 12.77      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.5/64.5 kB 1.9 MB/s eta 0:00:00
#0 12.79 Installing collected packages: wheel
#0 12.82 Successfully installed wheel-0.40.0
#0 19.78 Traceback (most recent call last):
#0 19.78   File "/usr/local/lib/python3.10/site-packages/bench/commands/make.py", line 68, in init
#0 19.78     init(
#0 19.78   File "/usr/local/lib/python3.10/site-packages/bench/utils/render.py", line 105, in wrapper_fn
#0 19.78     return fn(*args, **kwargs)
#0 19.78   File "/usr/local/lib/python3.10/site-packages/bench/utils/system.py", line 78, in init
#0 19.78     is_valid_frappe_branch(frappe_path=frappe_path, frappe_branch=frappe_branch)
#0 19.78   File "/usr/local/lib/python3.10/site-packages/bench/utils/__init__.py", line 75, in is_valid_frappe_branch
#0 19.78     raise InvalidRemoteException(
#0 19.78 bench.exceptions.InvalidRemoteException: Invalid branch or tag: v14.24.2 for the remote https://github.com/frappe/frappe
#0 19.78 
#0 19.78 ERROR: There was a problem while creating /home/frappe/frappe-bench
#0 19.78 Do you want to rollback these changes? [y/N]: Aborted!
------
Containerfile:106
--------------------
 105 |     ARG FRAPPE_PATH=https://github.com/frappe/frappe
 106 | >>> RUN export APP_INSTALL_ARGS="" && \
 107 | >>>   if [ -n "${APPS_JSON_BASE64}" ]; then \
 108 | >>>     export APP_INSTALL_ARGS="--apps_path=/opt/frappe/apps.json"; \
 109 | >>>   fi && \
 110 | >>>   bench init ${APP_INSTALL_ARGS}\
 111 | >>>     --frappe-branch=${FRAPPE_BRANCH} \
 112 | >>>     --frappe-path=${FRAPPE_PATH} \
 113 | >>>     --no-procfile \
 114 | >>>     --no-backups \
 115 | >>>     --skip-redis-config-generation \
 116 | >>>     --verbose \
 117 | >>>     /home/frappe/frappe-bench && \
 118 | >>>   cd /home/frappe/frappe-bench && \
 119 | >>>   echo "{}" > sites/common_site_config.json && \
 120 | >>>   find apps -mindepth 1 -path "*/.git" | xargs rm -fr
 121 |     
--------------------
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
softsuave-erp14

Please help me short out

there is no such tag in frappe use v14.25.0 or v14.24.0,

2 Likes

where did get this version details? please share me

https://github.com/frappe/frappe/releases, https://github.com/frappe/erpnext/releases

2 Likes