Friday, April 17, 2015

Docker - Debian with Apache, PHP and MySQL ou MariaDB conection




Just a simple container ready to connect to a MariaDB ou a MySQL server.

Dockerfile:



FROM debian

MAINTAINER David Kwast

RUN apt-get update && apt-get -y install apache2 mysql-client php5 php5-mysql libapache2-mod-php5 && apt-get clean

EXPOSE 80

CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]





Usage example:



docker run --name test -d -p 1080:80 -v [path_inside_host]:/var/www/

No comments: