invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
392 stars 255 forks source link

db container fails creating: bind mount failed #435

Closed wannesrams closed 2 years ago

wannesrams commented 2 years ago

Setup information

docker-compose

Describe the bug When running docker-compose -f docker-compose.yml up -d the creation of the db container fails with the following message

Creating network "invoiceninja5_invoiceninja" with the default driver Creating invoiceninja5_db_1 ... error

ERROR: for invoiceninja5_db_1 Cannot start service db: Bind mount failed: '/volume1/docker/invoiceninja5/docker/mysql/data' does not exists

ERROR: for db Cannot start service db: Bind mount failed: '/volume1/docker/invoiceninja5/docker/mysql/data' does not exists ERROR: Encountered errors while bringing up the project.

To reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots/logs If applicable, add screenshots to help explain your problem.

Any Error that sucks

Docker/Kubernetes/Helm:

Additional context Add any other context about the problem here.

turbo124 commented 2 years ago

Are you setting the correct user/group permissions prior to starting the containers?

wannesrams commented 2 years ago

Hey , thanks for answering, I got past it, the mysql and mysql/data folders do not exist after cloning the repo. I created them ( and also /mysql/bak in case you enable auto backups) and all works fine thanks. I think it would be great to add these folders to the repo by default

turbo124 commented 2 years ago

I think this would have been a permissions issue preventing the creation of the subdirectories when the container was building for the first time. We do stub the public and storage directories, but unless the permissions are set the container will fall over.