Is it just me or is it confirmed that Docker compose version 3.1 (docker-compose.yml file), does not mount volumes with docker-compose up
on Docker version 17.09.0-ce-win33 (13620)?
This is what I am using to create a wordpress container with a volume...
version: '3.1'
services:
mysite:
image: mysql:5.7
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: wp
# I created myimageswp483 as a custom-base image that is wordpress + php archive with the help of dockerfie. I can use this image for all wordpress 4.8.3 sites I create locally!
wordpress:
image: myimageswp483
ports:
- 8084:80
volumes:
- ./wp/html:/var/www/html/
links:
- mysite:mysql
environment:
WORDPRESS_DB_PASSWORD: wp
WORDPRESS_TABLE_PREFIX: mysitedockerlocal01_
This process was working for me in October. But as of November 22nd, it no longer mounts my volumes. Can anyone confirm that this process no longer works for Docker 17? If that is the case, how should I improve my docker compose file to allow mounting for Docker version 17.09.0-ce-win33 (13620)?
Thanks
I just solved my issue of restoring my ability to mount my volumes by
docker-compose down
I am now able to not only see my attached volume but also edit files there and see the execution through my browser.
I had the same issue. Thanks!
@blachawk Spent 3 hours trying to fix it, your set of steps got me back up and running. What a mess of a bug. Running docker for windows 2.0.0.3 (31259), Engine 18.09.2, compose 1.23.2. Based of @jasondicker comment also happening today, I wonder if something in the newer release has re-surfaced or caused this issue to occur more often.
Most helpful comment
I just solved my issue of restoring my ability to mount my volumes by
docker-compose down
I am now able to not only see my attached volume but also edit files there and see the execution through my browser.