You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open Docker and WSL 2
Install fresh new laravel project
Add to Dockerfile install xdebug RUN install-php-extensions xdebug
Build image
Go to php container and run php -v and look if xdebug in info message or not
When I run for check if's installed and enebled it return info "xDebug doesn't exists."
Affected Docker Images
I am using FROM serversideup/php:8.4-fpm-nginx-alpine
Anything else?
My Dockerfile
############################################
# Base Image
############################################
# Learn more about the Server Side Up PHP Docker Images at:
# https://serversideup.net/open-source/docker-php/
FROM serversideup/php:8.4-fpm-nginx-alpine AS base
## Uncomment if you need to install additional PHP extensions
# USER root
# RUN install-php-extensions bcmath gd
############################################
# Development Image
############################################
FROM base AS development
# We can pass USER_ID and GROUP_ID as build arguments
# to ensure the www-data user has the same UID and GID
# as the user running Docker.
ARG USER_ID
ARG GROUP_ID
# Switch to root so we can set the user ID and group ID
USER root
RUN install-php-extensions xdebug
# Set the user ID and group ID for www-data
RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \
docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginx
# Copy custom xdebug configuration
COPY ./.infrastructure/conf/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# Drop privileges back to www-data
USER www-data
############################################
# CI image
############################################
FROM base AS ci
# Sometimes CI images need to run as root
# so we set the ROOT user and configure
# the PHP-FPM pool to run as www-data
USER root
RUN echo "user = www-data" >> /usr/local/etc/php-fpm.d/docker-php-serversideup-pool.conf && \
echo "group = www-data" >> /usr/local/etc/php-fpm.d/docker-php-serversideup-pool.conf
############################################
# Production Image
############################################
FROM base AS deploy
COPY --chown=www-data:www-data . /var/www/html
# Create the SQLite directory and set the owner to www-data (remove this if you're not using SQLite)
RUN mkdir -p /var/www/html/.infrastructure/volume_data/sqlite/ && \
chown -R www-data:www-data /var/www/html/.infrastructure/volume_data/sqlite/
USER www-data
The text was updated successfully, but these errors were encountered:
Steps To Reproduce
Open Docker and WSL 2
Install fresh
new laravel
projectAdd to Dockerfile install xdebug
RUN install-php-extensions xdebug
Build image
Go to php container and run php -v and look if xdebug in info message or not
Also for check can be run
Outcome
What did you expect?
xdebug to be installed
What happened instead?
When I run for check if's installed and enebled it return info "xDebug doesn't exists."
Affected Docker Images
I am using
FROM serversideup/php:8.4-fpm-nginx-alpine
Anything else?
My Dockerfile
The text was updated successfully, but these errors were encountered: