I have to make Laravel
app and to deliver a Dockerfile, but I’m really stuck with this. Before that I had a nightmare wile installing laravel
on my machine.
I’m trying to get dockervel
image and following the steps here:
http://www.spiralout.eu/2015/12/dockervel-laravel-development.html
But when I run dartisan make:auth it gives this error below:
**ERROR:** for dockervel_mysql_1 **Cannot restart container** c258b418c03cbd6ec02c349c12cf09403f0eaf42fa9248019af7860d037d6474: **driver failed programming external connectivity on endpoint dockervel_mysql_1** (da3dd576458aa1fe3af7b539c48b9d61d97432cf5e9ee02d78562851f53981ae): E**rror starting userland proxy: listen tcp0.0.0.0:3306: bind: address already in use.**
I have tried to Change the default port in the docker-compose.yml
ports: - "8084:80"
Still nothing, also tried to stop apache2 (service apache2 stop
) on my machine ,also tried docker-compose restart
and removing docker container dockervel_mysql_1
.
I have to mention that I have already one Laravel proj.
in /var/www/laravel
.
Please help!
Advertisement
Answer
Probably you have already a MySQL service running in port 3306. You should close it first.
Then try to end docker-compose down
and restart it with docker-compose up
.
Remember also to change the permissions after you add a file in your project (like dartisan make:auth
) with dpermit
UPDATE:
since you have changed the port to “8084” you should go to localhost:8084
If you see the apache default then you probably are browsing another server since dockervel is build upon nginx
.
You have also probably have some gaps on Docker. Don’t mix your local storage with docker storage. /var/www
in a container is different than your local /var/www
. in docker-compose.yml you mount the local ~/dockervel/www
to containers /var/www
.
I would suggest that you start all over again and revert the changes you’ve made to your apache server. Shut it down, you don’t need it. Dockervel will provide you with an NginX server in a container.