title: Vagrant + Docker + Wordpress
body: <p>I installed vagrant on a Mac and I want to achieve this : </p>
  
  <ol>
  <li>Launch vagrant up and have a vagrant with docker installed and docker compose</li>
  <li>Install Wordpress with mysql inside this vagrant machine with docker-compose up</li>
  <li>Have the folder (/var/www/html) of the docker container mapped as volume in my vagrant machine at /dockermapinVagrant</li>
  <li>Have this /dockermapinVagrant onto my host(OS X) and be able to modify files directly from the host</li>
  </ol>
  
  <p>I achieved that and everything works perfectly.
  I can add templates from my OS X host with no problems (dragging the theme in the themes folder on my host OS X), see the changes directly of the Wordpress site using my browser ...</p>
  
  <p><strong>The problem</strong> </p>
  
  <ul>
  <li>I noticed is that I can not install any plugins on Wordpress (
  dashboard -> updates ) I have a message : 
  
  <ul>
  <li>To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not
  remember your credentials, you should contact your web host.</li>
  </ul></li>
  </ul>
  
  <p><strong>Solution i tried</strong></p>
  
  <p>Change the permission in the docker container wp by setting the user to www-data and chmod to 777 but on some folder as wp-content it doesn’t change to 777. Moreover setting the owner to www-data doesn’t work at all it stay always to 1000:1000 in the container.</p>
  
  <p><strong>Is there a way to update the plugins on wordpress in a docker container without FTP ?</strong>  </p>
  
  <p>Is there maybe a better way do to that ? Use a data-only container on the vagrant machine with FTP access to the mounted volume ? And map the data container volume on the vagrant machine then to the host to have direct access and see changes directly during the dev process. But I do not want to give FTP access directly on the data-only container (FTP is not secure and I prefer to manage the backup and the data from the vagrant machine directly and delete the mapped volumes in production)</p>