Jump to content

[Laradock] docker-compose works only the first time


Kumidan

Recommended Posts

I'm starting to use Docker with Laravel, so I installed Laradock inside my existing Laravel project following the documentation, every step until the command
docker-compose up -d nginx mysql

the first time the command works and I can use my application.
Then I've used the command

docker-compose stop
and of course I can't reach my site because the webserver is off

running again
docker-compose up -d nginx mysql

I obtain this error

ERROR: for laradock_mysql_1  Cannot start service mysql: error while creating mount source path '/host_mnt/c/xampp/htdocs/laratest/laradock/mysql/docker-entrypoint-initdb.d': mkdir /host_mnt/c/xampp/htdocs/laratest: file exists

I've already tried
docker-compose down
before to run again the up command, but with no luck

why does this happen?
How do I correctly stop Docker and restart again?

P.S.
You see the path c/xampp/htdocs, that is where my projects are (until now I was used to use xampp for developing webapps on my local machine), but xampp is now not started, so it doesn't have any effect on Docker.
I'm on a Windows 10 machine

Link to comment
Share on other sites

I've figured out the problem.

I started the terminal inside a virtual folder created with a symbolic link, opening the terminal inside the folder which actually contains the project everything is working fine.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.