freecodecamp-PHP-OOP icon indicating copy to clipboard operation
freecodecamp-PHP-OOP copied to clipboard

i am not able to run the app

Open ahmadkakarr opened this issue 6 years ago • 2 comments

i tried everything sir..

in var/www/html folder my all the files don't mount only the one apache and mysql folder is there.

bind mount works only when i don't use docker-machine but in docker-machine it did not work :(

i also want to use docker-machines.. .i invested two days sir.. .:( can you tell me plesase what is wrong on internet and google have no answers.

i also asked on stackoverflow

https://stackoverflow.com/questions/57233380/bind-mount-is-not-working-when-i-run-containers-in-docker-machine

ahmadkakarr avatar Jul 27 '19 08:07 ahmadkakarr

Hi @ahmadkakarr, Unfortunately I am unable to reproduce this error. I have deleted my docker-machine and rebuilt it with no issues.
Please make sure your virtual machine is up to date. I am using Virtual box 6.0.10 These are the steps that I took to rebuild the Docker machine and test the containers

$ docker-machine rm howtocodewell-oop-php 
$ docker-machine create howtocodewell-oop-php
$ eval $(docker-machine env howtocodewell-oop-php)
$ docker-compose up -d --build

$ docker-compose exec web bash
root@74fccb9772fc:/var/www/html# ls
Dockerfile  LICENSE  README.md	apache	app  codeception.yml  composer.json  composer.lock  docker-compose.yml	mysql  public  src  tests  vendor
root@74fccb9772fc:/var/www/html#

root@74fccb9772fc:/var/www/html# vendor/bin/codecept run unit

// ...

Time: 416 ms, Memory: 12.00 MB

OK (78 tests, 167 assertions)

I recommend restarting your host machine If you have made any changes to your host OS or to virtual box (If you are using that).

pfwd avatar Jul 30 '19 18:07 pfwd

try to replace the line in docker-compose.yml

  - ./apache/conf/000-default.conf:/etc/apache2/sites-enabled/000-default.conf

with this one - ./apache/conf:/etc/apache2/sites-available

and reload Docker

This helped me on ubuntu as the first line didn't work on ubuntu.

amutylo avatar Aug 21 '19 08:08 amutylo