Jump to content
Sign in to follow this  
Kumidan

[Laradock] docker-compose works only the first time

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

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.