Docker Bench app installation failed

Hi,

unfortunately, I can’t install apps from Github in my ERPNext Docker environment. The following command is executed:

docker run -v frappe_docker_sites-vol:/home/frappe/frappe-bench/sites --network frappe_network --user frappe frappe/frappe-worker:v12.14.0 bench get-app jodit_html_editor GitHub - ashish-greycube/jodit_html_editor: Replace Quill Text Editor With Jodit HTML Editor on WebPage and WebForm

After execution I get the following error message:

Error: No such command “get-app”.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 18, in
[sys.executable, bench_helper, ‘frappe’] + sys.argv[1:],
File “/usr/local/lib/python3.7/subprocess.py”, line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/home/frappe/frappe-bench/env/bin/python’, ‘/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’, ‘frappe’, ‘get-app’, ‘jogit_html_editor’, 'https://github.com/ashish-greycube/jodit_html_editor’]’ returned non-zero exit status 2.

Is there a solution to this problem or another way to install more apps?

Bench not available in production images, check custom app for production section of frappe_docker

First thank you for the answer. I have now followed the following instructions: https://github.com/frappe/frappe_docker/blob/develop/docs/custom-apps-for-production.md

However, after successfully completing all the steps, the container with the customized NGINX image does not seem to start correctly. At least there is no port 80 open in the container.

Nginx dockerfile:

FROM bitnami/node:12-prod

COPY /home/frappe/docker/build/jodit_html_editor-nginx/install_app.sh /install_app

RUN chmod +x /install_app &&
apt-get update -y &&
apt-get install build-essential git python2 -y &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*

RUN /install_app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) version-12
RUN /install_app jodit_html_editor GitHub - ashish-greycube/jodit_html_editor: Replace Quill Text Editor With Jodit HTML Editor on WebPage and WebForm

FROM frappe/erpnext-nginx:v12.17.0

COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
COPY --from=0 /rsync /rsync

VOLUME [ “/assets” ]

ENTRYPOINT [“/docker-entrypoint.sh”]
CMD [“nginx”, “-g”, “daemon off;”]

Any idea why nginx doesn’t seem to start in the container?

Thanks in advance!


UPDATE: The Contaier is now running, but still without the plugin

Unfortunately no plugin works.

Nginx Dockerfile:

FROM bitnami/node:12-prod

COPY ./install_app.sh /install_app

RUN chmod +x /install_app &&
apt-get update -y &&
apt-get install build-essential git python2 -y &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*

RUN /install_app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) version-12
RUN /install_app jodit_html_editor GitHub - ashish-greycube/jodit_html_editor: Replace Quill Text Editor With Jodit HTML Editor on WebPage and WebForm
RUN /install_app pdf_on_submit GitHub - alyf-de/erpnext_pdf-on-submit: Creates a PDF when a document is submitted.

FROM frappe/erpnext-nginx:v12.17.0

COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
COPY --from=0 /rsync /rsync
RUN echo -n “jodit_html_editor” >> /var/www/html/apps.txt
RUN echo -n “pdf_on_submit” >> /var/www/html/apps.txt

VOLUME [ “/assets” ]

ENTRYPOINT [“/docker-entrypoint.sh”]
CMD [“nginx”, “-g”, “daemon off;”]

Worker Dockerfile:

FROM frappe/erpnext-worker:v12.17.0

RUN install_app jodit_html_editor https://github.com/ashish-greycube/jodit_html$
RUN install_app pdf_on_submit GitHub - alyf-de/erpnext_pdf-on-submit: Creates a PDF when a document is submitted.

docker-compose:
version: “3”

services:
  erpnext-test-nginx:
    image: jodit_html_editor-nginx
    build:
      context: ./build/jodit_html_editor-nginx/
    restart: on-failure
    environment:
      - FRAPPE_PY=erpnext-test-python
      - FRAPPE_PY_PORT=8000
      - FRAPPE_SOCKETIO=frappe-test-socketio
      - SOCKETIO_PORT=9000
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.erpnext-test-nginx.rule=Host(${SITES})"
      - "${ENTRYPOINT_LABEL}"
      - "${CERT_RESOLVER_LABEL}"
      - "traefik.http.services.erpnext-test-nginx.loadbalancer.server.port=80"
    depends_on:
      - erpnext-test-python
      - frappe-test-socketio
      - erpnext-test-worker-default
      - erpnext-test-worker-long
      - erpnext-test-worker-short
    links:
      - erpnext-test-python
      - frappe-test-socketio
      - erpnext-test-worker-default
      - erpnext-test-worker-long
      - erpnext-test-worker-short
    volumes:
      - sites-vol:/var/www/html/sites:rw
      - assets-vol:/assets:rw

  erpnext-test-python:
    image: jodit_html_editor-worker
    build:
      context: ./build/jodit_html_editor-worker
    restart: on-failure
    environment:
      - MARIADB_HOST=${MARIADB_HOST}
      - REDIS_CACHE=redis-test-cache:6379
      - REDIS_QUEUE=redis-test-queue:6379
      - REDIS_SOCKETIO=redis-test-socketio:6379
      - SOCKETIO_PORT=9000
      - AUTO_MIGRATE=1
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw
      - assets-vol:/home/frappe/frappe-bench/sites/assets:rw

  frappe-test-socketio:
    image: frappe/frappe-socketio:${FRAPPE_VERSION}
    restart: on-failure
    depends_on:
      - redis-test-socketio
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw

  erpnext-test-worker-default:
    image: jodit_html_editor-worker
    build:
      context: ./build/jodit_html_editor-worker
    restart: on-failure
    command: worker
    depends_on:
      - redis-test-queue
      - redis-test-cache
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw

  erpnext-test-worker-short:
    image: jodit_html_editor-worker
    build:
      context: ./build/jodit_html_editor-worker
    restart: on-failure
    command: worker
    environment:
      - WORKER_TYPE=short
    depends_on:
      - redis-test-queue
      - redis-test-cache
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw

  erpnext-test-worker-long:
    image: jodit_html_editor-worker
    build:
      context: ./build/jodit_html_editor-worker
    restart: on-failure
    command: worker
    environment:
      - WORKER_TYPE=long
    depends_on:
      - redis-test-queue
      - redis-test-cache
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw

  erpnext-test-schedule:
    image: jodit_html_editor-worker
    build:
      context: ./build/jodit_html_editor-worker
    restart: on-failure
    command: schedule
    depends_on:
      - redis-test-queue
      - redis-test-cache
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw

  redis-test-cache:
    image: redis:latest
    restart: on-failure
    volumes:
      - redis-cache-vol:/data

  redis-test-queue:
    image: redis:latest
    restart: on-failure
    volumes:
      - redis-queue-vol:/data

  redis-test-socketio:
    image: redis:latest
    restart: on-failure
    volumes:
      - redis-socketio-vol:/data

  mariadb-test-erp:
    image: mariadb:10.3
    restart: on-failure
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
    volumes:
      - ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
      - mariadb-vol:/var/lib/mysql

  site-test-creator:
    image: jodit_html_editor-worker
    build:
      context: ./build/jodit_html_editor-worker
    restart: "no"
    command: new
    depends_on:
      - erpnext-test-python
    environment:
      - SITE_NAME=${SITE_NAME}
      - DB_ROOT_USER=${DB_ROOT_USER}
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
      - INSTALL_APPS=${INSTALL_APPS}
    volumes:
      - sites-vol:/home/frappe/frappe-bench/sites:rw

volumes:
  mariadb-vol:
  redis-cache-vol:
  redis-queue-vol:
  redis-socketio-vol:
  assets-vol:
  sites-vol:

networks:
  default:
    external:
      name: frappe_network

The build process is executed without errors.
I have also manually added the names of the apps in apps.txt.

@revant_one Do you have any other ideas?

did you install the new app?

did you set variable INSTALL_APPS=erpnext,<your_app_name> ?