I can’t figure out the logic of that.I have a dockerfile file as follows.
FROM php:fpm RUN touch /var/www/html/foo.php
this is my compose file:
version: '3' services: web: container_name: phpx build : . ports: - "80:80" volumes: - ./code:/var/www/html
I never see foo.php in my directory named code. How can I see foo.php?
what is the logic of it? When I remove the ‘volumes’ parameter, it creates in the container, but my code directory does not see.Because it is not synchronous.
How do I write a code in the dockerfile file?