ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Error installing erp next on docker using apple sillicon

Hello community! I apologize if my questions are considered a joke by professional developers.

Step to reproduce the errors:

  1. I commented Maria db section in .devcontainer/docker-compose.yml
  2. I uncomment postgres section
  3. I run Remote-containers: Reopen in Container

here are the snippets of docker-compose.yml

version: "3.7"
services:
 # mariadb:
 #   image: mariadb:10.3
 #   environment:
 #     - MYSQL_ROOT_PASSWORD=123
 #     - MYSQL_USER=root
 #   volumes:
 #     - ../installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
 #     - mariadb-vol:/var/lib/mysql

  # Enable PostgreSQL only if you use it, see development/README.md for more information.
    postgresql:
      image: postgres:11.8
      restart: on-failure
      environment:
        - POSTGRES_PASSWORD=123
      volumes:
        - postgresql-vol:/var/lib/postgresql/data

  redis-cache:
    image: redis:alpine

  redis-queue:
    image: redis:alpine

  redis-socketio:
    image: redis:alpine

  frappe:
    image: frappe/bench:latest
    command: sleep infinity
    volumes:
      - ..:/workspace:cached
    working_dir: /workspace/development
    ports:
      - "8000-8005:8000-8005"
      - "9000-9005:9000-9005"

volumes:
  mariadb-vol:
  postgresql-vol:

then I got the following errors:

[134 ms] Remote-Containers 0.191.0 in VS Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8).
[133 ms] Start: Resolving Remote
[135 ms] Setting up container for folder or workspace: /Users/users/blabla/frappe_docker
[136 ms] Start: Check Docker is running
[136 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[248 ms] Server API version: 1.41
[258 ms] Start: Run: docker-compose version --short
[562 ms] Start: Run: docker ps -q -a --filter label=com.docker.compose.project=frappe_docker_devcontainer --filter label=com.docker.compose.service=frappe
[682 ms] Start: Run: docker-compose -f /Users/users/blabla/frappe_docker/.devcontainer/docker-compose.yml config
[988 ms] 
[988 ms] yaml.parser.ParserError: while parsing a block mapping
  in "/Users/users/blabla/frappe_docker/.devcontainer/docker-compose.yml", line 1, column 1
expected <block end>, but found '<block mapping start>'
  in "/Users/users/blabla/frappe_docker/.devcontainer/docker-compose.yml", line 21, column 3

[988 ms] Exit code 1
[989 ms] Command failed: docker-compose -f /Users/users/blabla/frappe_docker/.devcontainer/docker-compose.yml config

potentially errors:
I am using Arm instead x86, I don’t know how to add user to docker group on mac (I think it only works on linux), I choose postgres over default option (mariadb), I use bleeding edge node instead of 12 LTS, I also use postgres 13

expected behavior:
Successfuly run erp next locally using docker

Thanks in advance for your kindly help!

  1. Arm64 images need to be built. Officially only amd64 images are built
  2. Yaml has errors. Postgres service has extra tab I guess.
  3. ERPNext needs Mariadb. You can only use PostgreSQL to develop non ERPNext frappe apps.

I also have M1 Mac. I build apps using Frappe framework. Couple months ago I spent a lot of time to make it work in Docker—not worth it. It crashes sometimes for no reason (and restarts). Instead, I now use Frappe (and ERPNext) installed directly on my Mac. Everything works fine. Only compromise is Python 3.7 installed under Rosetta.

Thank you very much for your help!! :slight_smile:

Hey, glad to hear that it works directly on mac. By the way, do you still choose docker for deployment besides any caveats it has in m1 mac if you don’t mind me asking?

Not yet but I plan to switch to Docker for convenience

Thanks for the sharing :+1:

1 Like