#84 (comment) (by @pierreozoux)
@ailic you should open an other issue.
In your specific case, if wp-config.php is not created before starting, docker (in previous version, it is no longer the case) would create a folder, and not a file. (Now, with latest version, you'll just get an error).
The problem occurs when trying to mount the file, in this case wp-config.php. Just mounting folders works without problems.
Here's the content of docker-compose.yml file:
version: '2'services:
web:
image: wordpressports:
- "80:80"volumes:
- ./src/wordpress/wp-content:/var/www/html/wp-content
- ./src/wordpress/wp-config.php:/var/www/html/wp-config.phpenvironment:
WORDPRESS_DB_NAME: db_nameWORDPRESS_DB_HOST: dbWORDPRESS_DB_PASSWORD: db_passlinks:
- db:mysqldb:
image: mysqlports:
- "3306:3306"volumes:
- mysql-data:/var/lib/mysqlenvironment:
MYSQL_ROOT_PASSWORD: db_passvolumes:
mysql-data:
external: true
If wp-config.php file is previously created, command docker-compose up will fire the error:
WordPress not found in /var/www/html - copying now...
WARNING: /var/www/html is not empty - press Ctrl+C now if this is an error!
+ ls -A
wp-config.php
+ sleep 10
Complete! WordPress has been successfully copied to /var/www/html
sed: cannot rename ./sedgnRHlX: Device or resource busy
If not previously created (wp-config.php), error would be:
sed: couldn't edit wp-config.php: not a regular file
and folder with that name would be created.
Environment:
Docker version 1.10.3, build 20f81dd
docker-compose version 1.6.2, build 4d72027
#84 (comment) (by @pierreozoux)
The problem occurs when trying to mount the file, in this case wp-config.php. Just mounting folders works without problems.
Here's the content of docker-compose.yml file:
If wp-config.php file is previously created, command docker-compose up will fire the error:
If not previously created (wp-config.php), error would be:
and folder with that name would be created.
Environment: