Skip to content

Instantly share code, notes, and snippets.

@abrahaobittar
Last active April 30, 2021 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrahaobittar/5160066abeaf35419dc3c17536ac6864 to your computer and use it in GitHub Desktop.
Save abrahaobittar/5160066abeaf35419dc3c17536ac6864 to your computer and use it in GitHub Desktop.
Dockerfile php8-apache
FROM php:8.0-apache
# Habilitando o modo de reescrita do Apache
RUN a2enmod rewrite
#instalacao composer
RUN apt-get update && apt-get install curl \
&& curl -sS https://getcomposer.org/installer | php \
&& chmod +x composer.phar && mv composer.phar /usr/local/bin/composer
# Instalacao de extensoes basicas do PHP
# Qualquer nova extensao pode ser adicionada aqui
# Utilizar sempre o docker-php-ext-install quando possível ao inves de apt-get,
RUN docker-php-ext-install pdo pdo_mysql
#Instalacao e configuracao vscode3.0
RUN yes | pecl install xdebug-3.0.0 \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode=debug,develop" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.discover_client_host=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.client_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/xdebug.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment