

RUN cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load RUN docker-php-ext-install mysql mysqli pdo pdo_mysql Thanks for your Thanks!! I did that, and also included regular mysql and pdo, and also added a RUN for enabling mod_rewrite on apache, which we were previously doing by an exec command.įor anyone who comes upon this issue, be it known that the following Dockerfile works as expected: FROM php:5.4-apache We just hired some new developers and they're like "why make things complicated by using docker?" since we weren't able to get their dev environment set up with 3 commands like we did before the November change. Sudo docker run -d -p 80:80 -name kcity-web -v "$(pwd)":/var/www/html -link kcity-mysql:mysql php:5.4-apache Sudo docker run -it -link kcity-mysql:mysql -v "$(pwd)":/tmp/import -rm mysql sh -c 'exec mysql -h$MYSQL_PORT_3306_TCP_ADDR -P$MYSQL_PORT_3306_TCP_PORT -uroot -p < /tmp/import/sample_data.sql' So before it broke, this is what our company did to go from a folder with the website in it to a full running website: sudo docker run -name kcity-mysql -e MYSQL_ROOT_PASSWORD=password123 -e MYSQL_USER=knowledgecity -e MYSQL_PASSWORD=password123 -e MYSQL_DATABASE=test -d mysql But if you all still agree that even in php5.4 mysql should not be included, please provide us the new way, as I was not able to find any documentation of specifically enabling mysql, mysqli, and pdo with the new ext-install script. So I just wanted to let you know that update broke our company's nice docker off-the-shelf solution.

In 5.6+ I fully support it because nowadays it's not a given that you're using a mysql database. IMHO mysql mysqli and mysql pdo should be included always, especially in php5.4 where that was THE standard at the time, so anyone still using 5.4 is probably doing it because of mysql.Īnyways, I don't think individuals should have to maintain and build dockerfiles just to add extensions that everybody always had in php5.4.

Now it seems we can't just pull an off the shelf image, like we used to pull an off the shelf LAMP stack, to run. I understand that all extensions were removed, but please consider that the standard php5.4 lamp stack has always included mysql. our site was up and running on a local developer's machine.Īs of Nov 10, it's broken.

Hi guys, I love docker and I'm transitioning our company to using docker for everyone's dev environment.Ī year ago, all I had to do was pull the mysql:latest and php5.4-apache images, and DONE.
