0

I put my Symfony project into Docker, using a volume for my code. I want to user a php command (php app/console doctrine:generate:entities MyBundle:MyEntity to be precise).

When I try to use my php command outside docker, where my code is, nothing happen. But when I connect myself into my docker, the php command is running well.

Do you know why my php command is not working outside my docker ?

Thanks :)

2
  • Maybe because php is not installed? Commented Jul 11, 2019 at 18:21
  • @alex not cause of this, the php command I'm able to use it everywhere else Commented Jul 12, 2019 at 7:22

1 Answer 1

2

Docker contains your PHP image, it is only accessible from your container. If you try to make your order out of your Docker, it will not just find PHP sources because they are containerized

Your Symfony application can find them because you have indicated the way to the sources Dockers, that's all :)

Sign up to request clarification or add additional context in comments.

1 Comment

Oh i see, so maybe i didn't well understood. The symfony file / code i wrote is just like a pointer to the file that are actually inside the docker ? I think it's in my computer environment, but in reality my code is inside the docker right ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.