Dockerfile linksexport UID
If you does not use bash-shell initialize UID variable with your current user ID. Example:
export UID=1000
docker-compose.ymlSuggested path for docker-compose.yml root of your project.
version: '3.6'
services:
php:
image: nafigat0r/php-cli:7.2
user: ${UID}:${UID}
command: script.php
volumes:
- ./:/var/www/html/
restart: unless-stopped
Than add ini-settings to override.ini
xdebug.remote_host = 192.168.100.100
xdebug.remote_enable = 1
xdebug.remote_host - host machine IP
docker-compose build --force-rm --no-cache --pull
docker-compose up -d --remove-orphans
Create new volume in docker-compose.yml like this:
volumes:
- ./override.ini:/etc/php/7.2/cli/conf.d/zz-override.ini
Create Dockerfile:
FROM nafigat0r/php-cli:7.2
# Change locale
RUN sed -i -e "s/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/" /etc/locale.gen \
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \
&& update-locale LANG=ru_RU.UTF-8
ENV LANG ru_RU.UTF-8
# Change the docker default timezone from UTC to MSK
RUN echo "Europe/Moscow" > /etc/timezone \
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure tzdata
command: wait-for rabbitmq:5432 -- script.php
Content type
Image
Digest
sha256:6b823a0e2…
Size
62.3 MB
Last updated
almost 4 years ago
docker pull nafigat0r/php-cli