0

I get the following error while trying to compose-up a project.

ERROR: for backend  Cannot start service backend: error while creating mount source path '/private/var/folders': mkdir /private: file exists Encountered errors while bringing up the project.

Can you please advise?

(...)
 backend:
    build:
      context: backend
      dockerfile: Dockerfile
    command: python /app/backend/app/main.py
    ports:
      - 8888:8888
    tty: true
    volumes:
      - ./backend:/app/backend
      - ./.docker/.ipython:/root/.ipython:cached
      - /private/var/folders:/var/folders
    environment:
      PYTHONPATH: .
      MOSEY_ENV: "dev"
    depends_on:
      - "postgres"

(...)

Thank you,

Osslot
  • 21
  • 3

1 Answers1

0

From your configuration with volumes and the error your are receiving, it seems to me that you have a file' at /private (global path on your computer, not your volume) which is causing the command to return an error.
The second option is that you are using OSX and the /private directory is restricted to the root user. You may have to run the command as sudo.

michmich112
  • 744
  • 4
  • 8