Using composer with wordpress in docker
<p>I'm try to setup a docker workspace with Alpine, PHP, Apache, MySQL and Composer.</p>

<p>Currently I'm trying to use the following images: </p>

<p><strong>PHP, Alpine and Composer:</strong> <a href="https://hub.docker.com/r/petehouston/docker-alpine-php-composer/" rel="nofollow noreferrer">https://hub.docker.com/r/petehouston/docker-alpine-php-composer/</a></p>

<p><strong>Wordpress:</strong> <a href="https://hub.docker.com/_/wordpress/" rel="nofollow noreferrer">https://hub.docker.com/_/wordpress/</a></p>

<p>I created a <strong>docker-compose.yml</strong> file to manage this dependencies for me.</p>

<p><strong>docker-compose.yml</strong></p>

<pre><code>version: '2'

services:
   db:
     image: mysql:5.7
     volumes:
       - ./db:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: wordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     volumes:
       - ./www:/var/www/html
     links:
       - db
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_PASSWORD: wordpress

   alpine:
     image: petehouston/docker-alpine-php-composer:latest
     links:
       - wordpress
</code></pre>

<p>So my problem is I'm trying to use the composer of the alpine container to manager my Wordpress in the wordpress container but when i try to use the following command:</p>

<pre><code>docker run --rm -v $(pwd):/www -w /wordpress/var/www/html composer/composer create-project roots/sage your-theme-name 8.5.0
</code></pre>

<p>nothing happens, and the alpine container doesn't stay up, after i run <code>compose-docker.up</code> he exits</p>