Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Dockerfile:


FROM tutum/apache-php
RUN apt-get update && apt-get install -yq git && rm -rf /var/lib/apt/lists/*
RUN rm -fr /app
ADD . /app


docker run -d -p 8090:80 --link mydb:mysql --name myapp amolsh/php-app


<?php
$IP = getenv('MYSQL_PORT_3306_TCP_ADDR');
$PORT = getenv('MYSQL_PORT_3306_TCP_PORT');
$mysql_hostname = "$IP:$PORT";
$mysql_user = "admin";
$mysql_password = "admin";
$mysql_database = "br";
$prefix = "";
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect database");
mysql_select_db($mysql_database, $bd) or die("Could not select database");

?>


Docker Pull Command
Owner
amolsh