{"action":"closed","issue":{"url":"https://api.github.com/repos/docker-library/wordpress/issues/135","repository_url":"https://api.github.com/repos/docker-library/wordpress","labels_url":"https://api.github.com/repos/docker-library/wordpress/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/wordpress/issues/135/comments","events_url":"https://api.github.com/repos/docker-library/wordpress/issues/135/events","html_url":"https://github.com/docker-library/wordpress/issues/135","id":144115505,"number":135,"title":"Not able to mount file (e.g. wp-config.php)","user":{"login":"ailic","id":390496,"avatar_url":"https://avatars.githubusercontent.com/u/390496?v=3","gravatar_id":"","url":"https://api.github.com/users/ailic","html_url":"https://github.com/ailic","followers_url":"https://api.github.com/users/ailic/followers","following_url":"https://api.github.com/users/ailic/following{/other_user}","gists_url":"https://api.github.com/users/ailic/gists{/gist_id}","starred_url":"https://api.github.com/users/ailic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ailic/subscriptions","organizations_url":"https://api.github.com/users/ailic/orgs","repos_url":"https://api.github.com/users/ailic/repos","events_url":"https://api.github.com/users/ailic/events{/privacy}","received_events_url":"https://api.github.com/users/ailic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-03-29T00:05:46Z","updated_at":"2017-02-09T18:49:31Z","closed_at":"2017-02-09T18:49:31Z","body":"https://github.com/docker-library/wordpress/issues/84#issuecomment-202476335 (by @pierreozoux)\n\n> @ailic you should open an other issue.\n> 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).\n\nThe problem occurs when trying to mount the file, in this case _wp-config.php_. Just mounting folders works without problems.\n\nHere's the content of _docker-compose.yml_ file:\n\n``` yaml\nversion: '2'\nservices:\n  web:\n    image: wordpress\n    ports:\n      - \"80:80\"\n    volumes:\n      - ./src/wordpress/wp-content:/var/www/html/wp-content\n      - ./src/wordpress/wp-config.php:/var/www/html/wp-config.php\n    environment:\n      WORDPRESS_DB_NAME: db_name\n      WORDPRESS_DB_HOST: db\n      WORDPRESS_DB_PASSWORD: db_pass\n    links:\n      - db:mysql\n  db:\n    image: mysql\n    ports:\n      - \"3306:3306\"\n    volumes:\n      - mysql-data:/var/lib/mysql\n    environment:\n      MYSQL_ROOT_PASSWORD: db_pass\nvolumes:\n  mysql-data:\n    external: true\n```\n\nIf _wp-config.php_ file is previously created, command **docker-compose up** will fire the error:\n\n```\nWordPress not found in /var/www/html - copying now...\nWARNING: /var/www/html is not empty - press Ctrl+C now if this is an error!\n+ ls -A\nwp-config.php\n+ sleep 10\nComplete! WordPress has been successfully copied to /var/www/html\nsed: cannot rename ./sedgnRHlX: Device or resource busy\n```\n\nIf not previously created (_wp-config.php_), error would be:\n\n```\nsed: couldn't edit wp-config.php: not a regular file\n```\n\nand folder with that name would be created.\n\nEnvironment:\n\n```\nDocker version 1.10.3, build 20f81dd\ndocker-compose version 1.6.2, build 4d72027\n```\n"}}
{"actor":{"display_login":"yosifkit"}}