I have created a docker-compose file to be able to create the two containers that I need right now a custom mysql container and a wordpress container. I try to create volume and share folders so as not to lose the data and to be able to modify the php files.
The fact is that the two volumes are created. When I do a docker volume ls appear, but the container and 'my pc' are not communicated through the shared folder. Absolutely nothing is downloaded to the folder. It's as if there is no communication at all.
My pc is a windows 10 pro, and I have the docker containers in linux.
File docker-compose:
version: '3.0'
services:
db:
image: mysql:custom
volumes:
- c:\proyectos\bbdd:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: ****
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- C:\proyectos\wordpress:/var/www/html
ports:
- "8000:80"
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: ****
volumes:
I've been working with docker for a few days, I'm not an expert. Thanks for your time and help.