I am starting with docker and I try to set up wordpress instance.
I use docker-compose
to establish a wordpress instance which is up and running, but I can't find any wordpress files that should be imported into the project.
I guess this might be a Windows 10 feature and on Linux/MacosX everything runs more smoothly. Maybe the volume path is not set properly. This refers to the wordpress docker container, but I guess it would be the same using something else.
Please provide a suggestion as I am being completely stuck on this.
I created the following docker-compose.yaml
file:
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
networks:
- wpsite
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- '8000:80'
restart: 'always'
volumes:
- ./:/var/www/html
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
networks:
- wpsite
networks:
wpsite:
volumes:
db_data:
I find it strange that If I change:
volumes:
- ./:/var/www/html
into
volumes:
- ./:/var/www
an empty html folder appears in my project. So thefile path seems to be set properly.
I was investigating docker settings and shared my C disk. Path is c:\projects\project
.
I have no idea what to do next. Any help would be welcome. Thanks.