api-platform: Can't access localhost/app_dev.php (similar to #169) (docker install, Ubuntu 16.04)

Hi,

Currently banging my head against a wall of incomprehension at this stage of the tutorial: appdevfails

What I did:

  • corrected my mistake of not having used docker-compose as a user instead of root by adding my user to the docker group, rebooted, deleted the already built docker images, deleted the skeleton-project including the root-owned folders;
  • ran docker-compose up -d again, as a user this time, in a freshly copy pasted skeleton-project and followed the tutorial up to the same point;
  • same error. var/cache/dev is still root-owned.

No idea what I did wrong. Any clue as to what it might be? Thanks in advance for any input you may have, and thank you for this great looking project 😃

ps: May be worth noting that I’m a docker noob.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

I believe this is solved by #162 😃 Great job on the docker updates.

Hello,

I had the same issue. It comes from composer install executed as root in docker/start.sh

To solve that, I added after composer call in start.sh

#get apache user : second word of the first line (from docker/apache/start_safe_perms)
apache_user=$(head -n 1 /etc/apache2/apache2.conf| cut -d " " -f 2)

#get apache group : second word of the second line
apache_group=$(head -n 2 /etc/apache2/apache2.conf| tail -1 |  cut -d " " -f 2)

chown -R $apache_user:$apache_group var

Are you interested on a PR ?