Skip to content

Instantly share code, notes, and snippets.

@CViniciusSDias
Created May 2, 2022 15:25
Show Gist options
  • Save CViniciusSDias/c785b82e4f724d3737b43dfbe4ff8819 to your computer and use it in GitHub Desktop.
Save CViniciusSDias/c785b82e4f724d3737b43dfbe4ff8819 to your computer and use it in GitHub Desktop.
xdebug.mode=debug
xdebug.discover_client_host=0
xdebug.client_host=host.docker.internal
<?php
function exibeMensagem(string $texto): void
{
echo $texto;
}
$texto = 'Olá mundo';
exibeMensagem($texto);
version: '3.7'
services:
php:
build:
context: .
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- 8123:8123
volumes:
- ./:/app
working_dir: /app
entrypoint: "php -S 0.0.0.0:8123"
FROM php:8.1-cli
COPY 90-xdebug.ini "${PHP_INI_DIR}/conf.d"
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment