Created
November 8, 2018 16:36
-
-
Save rasteiner/a260893be85019113aa28fad9315f479 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function APACHE { | |
docker run -d --rm -p 80:80 -v "${PWD}:/var/www/html" rasteiner/phpapache-for-devs | |
} | |
function APACHE7 { | |
docker run -d --rm -p 80:80 --env XDEBUG_CONFIG="remote_enable=0 profiler_enable=0" -v "${PWD}:/var/www/html" rasteiner/phpapache-for-devs:php7 | |
} | |
function APACHE7-DEBUG { | |
$HostIP = ( ` | |
Get-NetIPConfiguration | ` | |
Where-Object { ` | |
$null -ne $_.IPv4DefaultGateway ` | |
-and ` | |
$_.NetAdapter.Status -ne "Disconnected" ` | |
} ` | |
).IPv4Address.IPAddress | |
Write-Output "Debug enabled for ${HostIP}" | |
docker run -d --rm -p 80:80 --env XDEBUG_CONFIG="remote_enable=1 remote_host=${HostIP} profiler_enable=0" -v "${PWD}:/var/www/html" rasteiner/phpapache-for-devs:php7 | |
} | |
function APACHE7-PROFILE { | |
$HostIP = ( ` | |
Get-NetIPConfiguration | ` | |
Where-Object { ` | |
$null -ne $_.IPv4DefaultGateway ` | |
-and ` | |
$_.NetAdapter.Status -ne "Disconnected" ` | |
} ` | |
).IPv4Address.IPAddress | |
docker run -d --rm -p 80:80 --env XDEBUG_CONFIG="remote_enable=1 remote_host=${HostIP} profiler_enable=1" -v "${PWD}:/var/www/html" rasteiner/phpapache-for-devs:php7 | |
} | |
function STOP-APACHE { | |
$containers = docker ps -q --filter ancestor=rasteiner/phpapache-for-devs | |
docker stop $containers | |
} | |
function STOP-APACHE7 { | |
$containers = docker ps -q --filter ancestor=rasteiner/phpapache-for-devs:php7 | |
docker stop $containers | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment