At the moment I have setup a simple lamp stack environment with docker. However, when I specify e.g. a php.ini file, the php.ini file shows up as a folder and not a specific ini file - which means that I cannot edit it.
some volumes context of my dockerfile:
volumes:
- ./:/var/www/html
- ./.docker/php/custom.ini:/usr/local/etc/php/php.ini
What am I missing? php.ini should be a file, and not a folder, no?.
CodePudding user response:
Directories are created whenever Docker cannot find the file specified, leading to it assuming you want it created.
Don't use relative directories in volume mounts, always use the full path, for example by prefixing your bind mount with $(pwd)
.
If you're a Docker Desktop user, make sure you have allowed the given path to be mounted as volume.