Docker (NGINX, PHP, mySQL) and Windows - File Permissions -


i've been looking docker few hours; i'm running windows 8.1 host machine, , virtualbox boot2docker.

this docker-compose.yml:

mysql:     image: mysql     ports:          - "6603:3306"         environment:         mysql_root_password: mysql         mysql_user: mysql fpm:     image: php:7.0.2-fpm     volumes:         - /c/users/administrator/www:/var/www/html     ports:         - "9000:9000"     links:         - mysql nginx:     image: nginx      ports:         - "80:80"         - "443:443"     volumes:         - /c/users/administrator/www:/var/www/html     links:         - fpm 

this works fine (i can go docker ip address , see nginx welcome page); although when run mkdir example (through php) give error regarding windows permissions.

you should use volumes tag instead of volumes_from

  • volumes can mount directories host machine container ,
  • volumes_from mounts directories other services or containers

please @ docker-compose file documentation

and docker-compose file should this:

fpm:     image: php:7.0.2-fpm     volumes:         - /c/users/administrator/www:/var/www/html     ports:         - "9000:9000"     links:         - mysql nginx:     image: nginx      ports:         - "80:80"         - "443:443"     volumes_from:         - fpm     links:         - fpm 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -