Answer the question
In order to leave comments, you need to log in
How to run php-fpm debug mode in docker container if php-fpm is run from shell script?
I am using php-fpm image from github link
Extended
it like this
Dockerfile
FROM php:5.6-fpm
WORKDIR /app
COPY php.ini /usr/local/etc/php/
RUN apt-get update \
&& apt-get install -y nano sudo redis-tools ssh libmagickwand-dev libmagickcore-dev \
&& printf "\n" | pecl install imagick \
&& docker-php-ext-install pcntl mysql mysqli pdo pdo_mysql \
&& pecl install redis-3.1.0 \
&& docker-php-ext-enable redis \
&& pecl install xdebug-2.5.0 \
&& docker-php -ext-enable xdebug
CMD ["sudo", "bash", "/app/docker/start_workers.sh"]
#!/bin/bash
eval "php-fpm" &
sleep 5
eval "$(echo "sudo -uwww-data php /app/cli_resque.php -start")"
while true; do sleep 1; done
FROM php:5.6-fpm
WORKDIR /app
COPY php.ini /usr/local/etc/php/
RUN apt-get update \
&& apt-get install -y nano sudo redis-tools ssh libmagickwand-dev libmagickcore-dev \
&& printf "\n" | pecl install imagick \
&& docker-php-ext-install pcntl mysql mysqli pdo pdo_mysql \
&& pecl install redis-3.1.0 \
&& docker-php-ext-enable redis \
&& pecl install xdebug-2.5.0 \
&& docker-php -ext-enable xdebug
Answer the question
In order to leave comments, you need to log in
/app/docker/start_workers.sh
#!/bin/bash
php-fpm &
sudo -uwww-data php /app/cli_resque.php -start
while true; do sleep 1; done
Solved the problem with the missing debug. I didn’t understand exactly what it is, but the problem is in the "eval" in the bash script, or whether it launches roofing felts in some kind of magical flow, well, everything is buzzing without it. Might be useful to someone)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question