Docker 2

OK, so I figured out what my problem was the first time around. The official  WordPress image is really only designed for fresh installs. Each time that image is run it loads a script that tries to setup your wp-config.php file, so if your file is good to go it will overwrite it with the default ENV vars of the Dockerfile. So for development purposes,  I stole what I needed from the WordPress Dockerfile. This is the Dockerfile for my "custom" image.

FROM php:5.6-apache

RUN a2enmod rewrite

# install the PHP extensions we need
RUN apt-get update &&\
    apt-get install -y libpng12-dev libjpeg-dev &&\
    rm -rf /var/lib/apt/lists/* &&\
    docker-php-ext-configure gd --with-png-dir=/usr\
    --with-jpeg-dir=/usr\
    docker-php-ext-install gd
RUN docker-php-ext-install mysqli

VOLUME /var/www/html
CMD ["apache2-foreground"]

Build it, then run it with the /var/www/html volume attached to my local /src dir. After that I just hop into /src and start making changes. I have a git repo in /src, for version control.