So I have a WordPress running on Docker and the upload size is 2M which is very low.
Based on this answer on Github and all the answers here my compose.yaml
file is as below:
services:
mysql:
image: mysql:latest
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
volumes:
- mysql_data:/var/lib/mysql
wordpress:
image: wordpress:latest
restart: unless-stopped
depends_on:
- mysql
ports:
- "8080:80"
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- wp_data:/var/www/html
volumes:
mysql_data:
wp_data:
Docker pulls the images and starts the containers and then gives me this error:
Error response from daemon: error while creating mount source path '/run/desktop/mnt/host/d/Projects/Wordpress/artanetwork.com/uploads.ini': mkdir /run/desktop/mnt/host/d: file exists
If I remove mounting uploads.ini
file, everything works fine.
I have no idea how to fix this.
This is Docker v26.1.4 on Windows 11.