docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.87k stars 290 forks source link

Volumes don't work after docker restart #1041

Closed Morgy93 closed 7 years ago

Morgy93 commented 7 years ago

Expected behavior

I have my docker container up and running fine and after restarting docker itself it should restart and work again fine with all volumes.

Actual behavior

I have my docker container up and running fine and after restarting docker itself my defined volumes are missing. We'll they're there but the content is missing.

Information

version: "3"
services:

  web:
    image: mgtcommerce/mgt-development-environment-5.6
    container_name: mgt
    hostname: mgt
    network_mode: bridge
    privileged: true
    ports: 
      - "80:80"
      - "443:443"
      - "22:22"
      - "3306:3306"
      - "3333:3333"
    volumes: 
      - ./htdocs/:/home/cloudpanel/htdocs_local/
      - ./sync/:/home/cloudpanel/sync/
      - ./mysql/:/var/lib/mysql_local/
      - ./nginx/sites-enabled/:/etc/nginx/sites-enabled/
    restart: on-failure

Steps to reproduce the behavior

  1. Start container: docker-compose up
  2. Go inside container: docker exec -it mgt bash
  3. Look for files ls /home/cloudpanel/sync
  4. See that your lokal foles from the sync folder should be there
  5. Exit docker completely and restart the program
  6. Go inside container: docker exec -it mgt bash
  7. Look for files ls /home/cloudpanel/sync
  8. See that your local files are missing now. <- this is the actual issue OPTIONAL:
  9. Stop the container: docker-compose stop
  10. Start the container again: docker-compose start
  11. See that it's working fine again. =)
friism commented 7 years ago

I think this is probably a dupe of this issue: https://github.com/docker/for-win/issues/584#issuecomment-286792858

Please comment if you don't think that's the case.

docker-robott commented 4 years ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked