Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No directory mapping on Windows 7 #8

Closed
DominikStyp opened this issue Jul 8, 2019 · 2 comments
Closed

No directory mapping on Windows 7 #8

DominikStyp opened this issue Jul 8, 2019 · 2 comments

Comments

@DominikStyp
Copy link
Contributor

DominikStyp commented Jul 8, 2019

Hello I have the following issue: When i run everything exactly with this tutorial, my container works. I go to the http://192.168.99.100/ and i see Symfony 4.3.2 welcome screen, no errors.
But problem is that i don't have any directory mappings, so i go to my symfony-docker directory where I see: docker-compose.yml, docker directory, and other files BUT no symfony directory to be found. Seems like following mapping does not work:

volumes:
      - ./symfony/:/var/www/symfony:cached

What would be cause of this ?
I have all the files inside the container but no mapping outside.
I've tried many things like removing :cached parameter, and rebuilding container.
None of it works. My docker-compose.yml is:

version: '3.7'
services:
  mysql:
    image: mysql:5.7
    ports: ['3306:3306']
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=symfony
      - MYSQL_USER=symfony
      - MYSQL_PASSWORD=password
  php:
    build: ./docker/php
    ports: ['9000:9001']
    links:
      - mysql
    volumes:
      - ./symfony/:/var/www/symfony
  nginx:
    build: ./docker/nginx
    ports: ['80:80']
    links:
      - php
    volumes:
      - ./logs/nginx:/var/log/nginx:cached
      - ./symfony/:/var/www/symfony
@coloso
Copy link
Owner

coloso commented Jul 8, 2019

Hi Dominik, sorry first i never tested it on Windows 7 before. I tested it on Windows 10 and can't reproduce your issue. But i would prefer using an Linux distribution instead.

It seem's like that Docker doesn't sync files with your host. ATM i have no clue why.
Are you running Docker as admin or check your Firewall/Virus scanner configuration. Do you share your drives with Docker?

On your host: you must have an "new" symfony directory and some other files.

BTW: For directories mounted with cached, the host’s view of the file system is authoritative; writes performed by containers are immediately visible to the host, but there may be a delay before writes performed on the host are visible within containers.

@DominikStyp
Copy link
Contributor Author

DominikStyp commented Jul 8, 2019

Thank you very much for your answer. You actually had a good point with "Do you share your drives with Docker?" - I've checked that Docker couldn't actually write nor read to my directories, so i Googled it and found an answer quickly.
docker/kitematic#2738
"Using toolbox, only your home user folder is shared with the VM. If a different location is selected, you will not be able to use that folder with a folder." - that was the case. I moved everything to my home directory and now it works like a charm. Shame I didn't find that information in Docker Toolbox documentation.
If anyone would be having the same problem first please run Docker Kinematic and try to change Volume settings for the container if it refuses to do so, check if your project is in you user profile directory.
Kitematic-change-docker-volume-settings

@coloso coloso closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants